Any year is entered through the keyboard. Write a program to determine whether the year is a leap year or not.



#include <stdio.h>
void main ()
{
      int a ;
      printf("enter year= ");
      scanf("%d", &a);
      if(a%4==0,a%100!=0)
            printf("leap year");
      else if(a%400==0)
        printf("leap year");
      else
        printf("not leap year");
     

}

Comments