Advertisement
mario_mos

or

Jul 24th, 2023
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. int x;
  2. printf("Enter an integer: ");
  3. scanf("%d", &x);
  4. printf("You entered: %d \n", x);
  5.  
  6.  
  7. for(int i=2; i <= x/i; i = i + 1)
  8. {
  9. int factor = x/i;
  10. if (factor*i == x)
  11. {
  12. printf(" false\n " );
  13. //break;
  14. }
  15. else {
  16. printf("true\n ");
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement