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