Advertisement
semsem_elazazy

practical 12

Dec 29th, 2021
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. int main()
  2. {
  3.     int n,c=0;
  4.   scanf("%d",&n);
  5.  
  6.  for(int i=2 ;i<n ; i++)
  7.       {
  8.           if(n%i==0)
  9.         c++;  
  10.       }
  11.      
  12.   if (c==0)
  13.   {
  14.   printf("prime");
  15. }
  16. else
  17. printf("not prime");
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement