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