Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2. int mult(int, int);
  3. int main (void)
  4. {
  5. int x, y, product;
  6. printf("enter the first intger : ");
  7. scanf("%d", &x);
  8. printf("enter the second integer : ");
  9. scanf("%d", &y);
  10. product = mult(x, y);
  11. if (product == 0)
  12. printf("the second integer is a multiple of the first");
  13. else if (product != 0)
  14. printf("the second integer is not a multiple of the first");
  15. return 0;
  16. }
  17. int mult(int x, int y)
  18. {
  19. int product;
  20. product = x % y;
  21.  
  22. return product;
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement