fork download
  1. #include <stdio.h>
  2. int fun1(int y)
  3. {
  4. int f=0;
  5. if((y%4==0)&&(y%100!=0)||(y%400==0))
  6. f=1;
  7. return f;
  8. }
  9. int main()
  10. {
  11. int x;
  12. scanf("%d",&x);
  13. int n=fun1(x);
  14. if(n==0)
  15. printf("%d is not leap year",x);
  16. else
  17. printf("%d is leap year",x);
  18. }
Success #stdin #stdout 0s 10320KB
stdin
2004
stdout
2004 is leap year