fork download
  1. #include <stdio.h>
  2. int main(void) {
  3. int year;
  4. scanf("%d",&year);
  5. if ((year % 400 == 0)||(!(year % 100 == 0) && year % 4 == 0 ))
  6. printf("うるう年です。");
  7. else
  8. printf("うるう年じゃないなり。");
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0s 5320KB
stdin
2400

stdout
うるう年です。