namereq

xはyの倍数

Jul 1st, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5.     int x,y;
  6.     printf("x,yを入力してください >");
  7.     scanf("%d%d", &x, &y);
  8.     printf("xはyの倍数で%s。\n", x%y == 0 ? "す" : "はありません");
  9.     return 0;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment