Guest User

C program

a guest
Jan 24th, 2016
186
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. int g(int n){if(n<=1)return 0;int i;for(i=2;i*i<=n;i++){if(n%i==0){return 0;}}return 1;}main(){int h,i=0,c=0;printf("Output:");scanf("%i",&h);while(c!=10){if(g(i)){printf("Prime %i\n", i);c++;}i++;}}
RAW Paste Data