| |
Program to print first 10 prime numbers
/*Program to print first 10 prime numbers*/
include<stdio.h>
main()
{
int ct=0,n=0,i=1,j=1;
clrscr();
while(n<10)
{
j=1;
ct=0;
while(j<=i)
{
if(i%j==0)
ct++;
j++;
}
if(ct==2)
{
printf("%d ",i);
n++;
}
i++;
}
getch();
}
Please send comments to vgdarur.javafive@blogger.com
|