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