#include <stdio.h>
int main ()
{
int year, month, flag = 0;
printf ("Enter Year and month:!\n");
scanf ("%d%d", &year, &month);
If (year% of 4 ==0 && year%!! = 0 | | Year% 400 ==0)
{
flag = 1;
printf ("The year you entered is a leap years \ n");
}
Else
{
Flag = 0;
printf ("The age you entered is common year!! \ n ");
}
Switch (month)
{
Case 1:
printf ("You entered a total of 31 days in January \ n");
Break
Case 2:
if (flag = = 1)
printf ("You entered a total of 29 days in February \ n");
Else
printf ("You entered a total of 28 days in February \ n");
Break
Case 3:
printf ("You entered a total of 31 days in March \ n");
Break
Case 4:
printf ("You entered a total of 30 days in April \ n");
Break
Case 5:
printf ("You entered a total of 31 days in May \ n");
Break
Case 6:
printf ("You entered a total of 30 days in June \ n");
Break
Case 7:
printf ("You entered a total of 31 days in July \ n");
Break
Case 8:
printf ("You entered a total of 31 days in August \ n");
Break
Case 9:
printf ("You entered a total of 30 days in September \ n");
Break
Case 10:
printf ("You entered a total of 31 days in October \ n");
Break
Case 11:
printf ("You entered a total of 30 days in November \ n");
Break
Case 12:
printf ("You entered a total of 31 days in December \ n");
Break
}
return 0;
}
Use the switch statement to program, determine whether a leap year is based on the years entered, and determine how many days of the month, based on the month entered