Menu

Iv Programming Implementation 30 1 Program Print Number Days Month Using Switchcase 10 Mar Q43819832

业大学考试命题纸 IV Programming and Implementation (30% ) 1. Program to print number of days in month using switch..case(10 marks) 1)业大学考试命题纸 IV Programming and Implementation (30% ) 1. Program to print number of days in month using switch..case(10 marks) 1) Input month number from user, Store it in some variable say month. 2) Switch the value of month i.e. switch(month) and match with cases. 3) There can be 12 possible values (choices) of month i.e. from 1 to 12. Hence, write 12 cases inside switch and one default case as else block. 4) Print 31 for case 1, 3, 5, 7, 8, 10, 12. 5) Print 30 for case 4, 6, 9, 11. 6) Print 28/29 for case 2. 7) Print invalid input for default case. Show transcribed image text 业大学考试命题纸 IV Programming and Implementation (30% ) 1. Program to print number of days in month using switch..case(10 marks) 1) Input month number from user, Store it in some variable say month. 2) Switch the value of month i.e. switch(month) and match with cases. 3) There can be 12 possible values (choices) of month i.e. from 1 to 12. Hence, write 12 cases inside switch and one default case as else block. 4) Print 31 for case 1, 3, 5, 7, 8, 10, 12. 5) Print 30 for case 4, 6, 9, 11. 6) Print 28/29 for case 2. 7) Print invalid input for default case.

Expert Answer


Answer to 业大学考试命题纸 IV Programming and Implementation (30% ) 1. Program to print number of days in month using swit…

OR