How to find that given year is leap year or not in C




#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr();
printf("enter the year");
scanf("%d",&year);
if(year%4==0)
{
printf("year is leap year");
}
else
{
printf("year is not year");
}
getch();
}

No comments:

Post a Comment