C++ Program to Print First 10 Prime Numbers

Here is the C++ program to print first 10 prime numbers.
Output
First Ten Prime Numbers Are
2
3
5
7
11
13
17
19
23
29

8 thoughts on “C++ Program to Print First 10 Prime Numbers

    1. Ananthprasad

      Already “2” has been printed as it is prime number so we start from i=2.

      Reply
    2. Swapnesh

      Bxoz we know 0,1 are not prime nos and 2 is smallest prime no hence we are checking the numbers from 3 onwards

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *