#include <stdio.h>
void main()
{
int year;
printf("Enter a year to check if it is a leap year\n");
scanf("%d", &year);
if ( (year%4 == 0) ||(year%100==0) && (year%400==0))
{
printf("leap year");
}
else
printf("not leap ");
getch();
}
void main()
{
int year;
printf("Enter a year to check if it is a leap year\n");
scanf("%d", &year);
if ( (year%4 == 0) ||(year%100==0) && (year%400==0))
{
printf("leap year");
}
else
printf("not leap ");
getch();
}
0 comments:
Post a Comment