fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a;
  5. scanf("%d",&a);
  6. if(a%4==0)
  7. {
  8. printf("%dはうるう年です",a);
  9. }
  10. else if(a%100==0)
  11. {
  12. printf("%dはうるう年ではない",a);
  13. }
  14. else if(a%400==0)
  15. {
  16. printf("%dはうるう年です",a);
  17.  
  18. }
  19. else
  20. printf("%dはうるう年ではない",a);
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 5288KB
stdin
2025
stdout
2025はうるう年ではない