Advertisement
sombriks

primos

Feb 22nd, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4. int main(int argc, char **argv){
  5.     int count,i,j;
  6.   i=1;
  7.   while(++i<=1967){
  8.     j=1;
  9.     count=0;
  10.     while(++j<=i){
  11.       if(i%j==0){
  12.         count++;
  13.       }
  14.     }
  15.     if(count==1){
  16.       printf("%d, ",i);
  17.     }
  18.   }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement