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