Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int x;
- printf("Enter an integer: ");
- scanf("%d", &x);
- if(x % 5 == 0 && x % 11 == 0) printf("%d is a multiple of both 5 and 11\n", x);
- else if(x % 5 == 0) printf("%d is a multiple of only 5\n", x);
- else if(x % 11 == 0) printf("%d is a multiple of only 11\n", x);
- else printf("%d is neither a multiple of 5 nor 11\n", x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment