In this program, the user is ask to enter the month, then the output will be the season in that month. For example, if user enter the month number as 6 then season will be RAINY SEASON.
#include<stdio.h>
int main()
{
int month;
printf("Enter the month: ");
scanf("%d", &month);
switch(month)
{
case 2:
case 3:
case 4:
case 5: printf("SUMMER SEASON");
break;
case 6:
case 7:
case 8:
case 9: printf("RAINY SEASON");
break;
case 10:
case 11:
case 12:
case 1: printf("WINTER SEASON");
break;
default: printf("Enter value between 1-12");
}
return 0;
}
Enter the month: 6
RAINY SEASON
Enter the month: 11
WINTER SEASON