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<iostream>
using namespace std;
int main()
{
int month;
cout<<"Enter the month: ";
cin>>month;
switch(month)
{
case 2:
case 3:
case 4:
case 5: cout<<"SUMMER SEASON";
break;
case 6:
case 7:
case 8:
case 9: cout<<"RAINY SEASON";
break;
case 10:
case 11:
case 12:
case 1: cout<<"WINTER SEASON";
break;
default: cout<<"Enter value between 1-12";
}
return 0;
}
Enter the month: 6
RAINY SEASON
Enter the month: 11
WINTER SEASON