Question: Write a program that determines the season based on the month. The program prompts a user to enter a month ( 1 - 1 2
Write a program that determines the season based on the month. The program prompts a user to enter a month and then prints the season of that month. That is if that month is in spring, summer fall or winter. The program must also check if a valid month was entered. For simplicity, assume: : spring, : summer, fall, winter.
int main
int
month;
do
cout "Month: ;
cin month;
do
month
month
;
switch
month
case :
case :
case :
cout "Spring
;
break;
case :
case :
case :
cout "Summer
;
break;
case :
case :
case :
cout "Fall
;
break;
case :
case :
case :
cout "Winter
;
break;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
