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("%dはうるう年です\n");
  8. else
  9. printf("%dはうるう年じゃないです\n");
  10. return 0;
  11. }
  12.  
  13.  
  14.  
  15.  
Success #stdin #stdout 0s 5320KB
stdin
2000
stdout
2000はうるう年じゃないです