i want to print first 10 prime numbers.i tried following code but nothing prints. here is the code.
can someone give me the code to print first 10 prime numbers nad also tell me whats wrong in my code
Code:#include <stdio.h> main() { int n,i=1,j,c,flag,count=0; for(i=2;i<=count;i++) { for(j=2;j<=i;j++) if(i%j==0) {flag=0; break;} if(i==j) goto t; } t: do { count++; printf("%d",i); } while(count<=10); }