fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int year;
  5. scanf("%d",&year);
  6. if(year%4==0){
  7. if (year%100==0){
  8. if(year%400==0){
  9. printf("うるう年です");
  10. }else{
  11. printf("うるう年ではありません");
  12. }
  13. }else{
  14. printf("うるう年です");
  15. }
  16. }else{
  17. printf("うるうどしではありません");
  18. }
  19. // your code goes here
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5300KB
stdin
400
stdout
うるう年です