Program to check whether given year is leap or not#include <stdio.h>
#include <conio.h>
void main()
{
int year;
clrscr();
printf("\nEnter Year : ");
scanf("%d",&year);
if(year %4 == 0)
{
printf("It is a leap year");
}
else
{
printf("It is not a leap year");
}
getch();
}
Output :
0 comments:
Post a Comment