fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int year;
  5.  
  6. scanf("%d",&year);
  7.  
  8. if((year%4==0)||(year%400==0)){
  9. if(year%100==0){
  10. printf("閏年ではない");
  11. }
  12. else{
  13. printf("閏年です");
  14. }
  15. }
  16. else{
  17. printf("閏年ではない");
  18. }
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5324KB
stdin
2016
stdout
閏年です