fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a,b;
  5.  
  6. scanf("%d",&a);
  7. scanf("%d",&b);
  8.  
  9. if(b%a==0)
  10. {printf("aはbの約数です");
  11. }
  12. else
  13. {printf("aはbの約数ではありません");
  14. }
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5288KB
stdin
3
9
stdout
aはbの約数です