Advertisement
naeem043

Docs Nayem

May 11th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement