hi,i am using dev c++.

here is my code.

Code:#include <stdio.h> #include <stdlib.h> int is_prime(int n); void main() { int x; printf("How many prime numbers? "); scanf("%d", &x); printf("\n %d prime numbers: ",x); int j=1; int i=1; for(i=1;i<=x;i++) { printf("\n %d :",i); for(j=1;is_prime(j)==0;j++) { if(is_prime(j)==1) printf("%d",j); } } system("PAUSE"); } //function definition int is_prime(int n) { int k, limit; if(n==1) return 0; if(n==2) return 1; if(n%2==0) return 0; limit =n/2; for(k=3;k<=limit;k+=2) if(n%k==0) return 0; return 1; }