#include<stdio.h>
int main()
{
int x;
printf("Enter the year\n");
scanf("%d",&x);
switch(x%4==0&&x%100!=0||x%400==0)
{
case 1:
printf("Enter year is leap year");
break;
default:
printf("Enter year is not leap year");
break;
}
}
OUTPUT
Enter the year
2020
Enter year is leap year
Comments
Post a Comment