fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a;
  5.  
  6. scanf("%d",&a);
  7. if(a%3==0 && !(a%5==0)){
  8. printf("3の倍数で、かつ5の倍数でない");
  9. }
  10. else{
  11. printf("3の倍数で、かつ5の倍数でなくはない");
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5316KB
stdin
15
stdout
3の倍数で、かつ5の倍数でなくはない