muftY

Prime advance camp

Feb 27th, 2020
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int x,y,z;
  5. //scanf("%d",&x);
  6. for(int x = 1; x <= 100; x++)
  7. {
  8. printf("%d is: ",x);
  9. if((x%2==1 && x%3==1) || (x%2==1 && x%3==2))
  10. {
  11. printf("prime");
  12. }
  13.  
  14. else
  15. {
  16. printf("Not prime");
  17. }
  18. printf("\n");
  19. }
  20.  
  21. return 0;
  22. }
Add Comment
Please, Sign In to add comment