SHARE
TWEET

C program

a guest Jan 24th, 2016 165 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top