SHARE
TWEET

Docs Nayem

naeem043 May 11th, 2018 (edited) 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Here is my comments & Code:
  2.  
  3.  
  4.  
  5.  
  6.  
  7. #include<stdio.h>
  8.  
  9. int main()
  10. {
  11.     int i,j;
  12.     for(i=2;i<=50;i++)
  13.     {
  14.         int status = 0;
  15.         for(j=2;j <= i/2;j++)
  16.         {
  17.             if(i%j == 0)
  18.             {
  19.                 status = 1;
  20.                 break;
  21.             }
  22.         }
  23.  
  24.         if(status == 0) printf("\t %d",i);
  25.     }
  26.  
  27.     return 0;
  28. }
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