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