Write a program to find first N prime numbers.

/**************************************************************/
/*Programmed by : Vivek Patel**********************************/
/*For Bugs Free feel to contact********************************/
/*Website : www.vivekpatel.cjb.net*****************************/
/*Email : vivek_patel9@rediffmail.com**************************/
/**************************************************************/

#include
#include
void main(){
int n,i,c=0,j,flag;
clrscr();
printf("*****Finding First N PRIME NUMBERS*****\n\n");
printf("Enter number : ");
scanf("%d",&n);

for(i=2;c for(j=2;j if(i%j == 0)
goto out;
}
printf("\n%3d is a PRIME NUMBER",i);
c++;
out:
}

getch();
}



Powered by Wufoo