Advertisement
rony-Rony_05

problem 5

Jun 21st, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int num,i,count=0;
  5. scanf("%d",&num);
  6. for(i=2;i<num;i++)
  7. {
  8. if(num%i==0)
  9.     count++;
  10. break;
  11. }
  12. if(count==0)
  13. printf("prime number");
  14. else
  15.     printf("not prime number");
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement