fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int x;
  5. scanf("%d",&x);
  6. if((x%4==0)&&!(x%100==0)||(x%400==0))
  7. {
  8. printf("%d年はうるう年",x);
  9. }
  10. else
  11. printf("%dはうるう年じゃない",x);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5316KB
stdin
2000
stdout
2000年はうるう年