Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x;
- printf("Enter an integer: ");
- scanf("%d", &x);
- printf("You entered: %d \n", x);
- for(int i=2; i <= x/i; i = i + 1)
- {
- int factor = x/i;
- if (factor*i == x)
- {
- printf(" false\n " );
- //break;
- }
- else {
- printf("true\n ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement