C Programming Codes to check the current year is leap year or not | C Programming Language
#include <stdio.h>
int main()
{int a;
printf("Enter the current year:");
scanf("%d",&a);
if (a%4==0&&a%100==0&&a%400==0)
printf ("It is a leap year.");
else if (a%4==0&&a%100!=0)
printf ("It is a leap year.");
else
printf("It is not a leap year.");
return 0;
}
Post A Comment:
0 comments so far,add yours