Advertisement
Mr_TRex

Divisible by 5 and 10

Jun 19th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int n;
  5.     printf("Enter integer to check divisible by 5 and 10 or not :\n");
  6.     scanf("%d", &n);
  7.     if(n % 5 == 0 && n % 10 == 0)
  8.         printf("%d is divisible\n", n);
  9.     else
  10.     printf("Not divisible\n");
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement