fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a;
  5. scanf("%d",&a);
  6. if(((a%4==0)&&!(a%100==0))||(a%400==0))
  7. {printf("閏年です");
  8. }
  9. else
  10. {printf("閏年ではありません");
  11. }
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5292KB
stdin
2004
stdout
閏年です