fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x;
  5. scanf("%d",&x);
  6. if ( x%400==0 )
  7. printf("うるう年です");
  8. else if ( x%100==0 )
  9. printf("うるう年ではありません");
  10. else if ( x%4==0 )
  11. printf("うるう年です");
  12. else
  13. printf("うるう年ではありません");
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5316KB
stdin
1600
stdout
うるう年です