fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int year;
  5. printf("please enter the year: ");
  6. scanf("%d",&year);
  7.  
  8. if(year%400==0){
  9. printf("%d is the leap year.",year);
  10.  
  11. }else if (year%100==0){
  12. printf("%d is not leap year.",year);
  13.  
  14. }else if (year%4==0){
  15. printf("%d is leap year.",year);
  16.  
  17. }else{
  18. printf("%d is not leap year.",year);
  19. }
  20.  
  21.  
  22.  
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
please enter the year: 32764 is leap year.