fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a;
  5.  
  6. printf("整数を入力してください:");
  7. scanf("%d",&a);
  8. if(a%3 == 0)
  9. {
  10. if(a%5 == 0)
  11. printf("Fizz Buzz");
  12. else
  13. printf("Fizz");
  14. }
  15. else
  16. {
  17. if(a%5 == 0)
  18. printf("Buzz");
  19. else
  20. printf("%d",a);
  21. }
  22. // your code goes here
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5308KB
stdin
55
stdout
整数を入力してください:Buzz