Question: Programming language C++ 3.3 Task Three(choose one of the tasks please) (1) Program to print the number of days in month using switch...case Input month
3.3 Task Three(choose one of the tasks please) (1) Program to print the number of days in month using switch...case Input month number from user. Store it in some variable say month Switch the value of month i.e. switch(month) and match with cases. There can be 12 possible values (choices) of month i.e. from 1 to 12. cases inside switch and one default case as else block Print 31 for case 1, 3, 5, 7, 8, 10, 12 Print 30 for case 4, 6, 9, 11. Print 28/29 for case 2. Print invalid input for default case The execution of the program may look like the following lease input a nonth nunber: 2 8/29 rocess exited after 2.363 seconds with return value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
