1
0

c4-8-3.c 299 B

1234567891011121314151617
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int year,leap;
  5. printf("enter year:");
  6. scanf("%d",&year);
  7. if((year%4==0 && year%100!=0) || (year%400==0))
  8. leap=1;
  9. else
  10. leap=0;
  11. if (leap)
  12. printf("%d is ",year);
  13. else
  14. printf("%d is not ",year);
  15. printf("a leap year.\n");
  16. return 0;
  17. }