Question: Programming Language: C# Using Visual Studios Write a program that accepts an integer between 1 and 12 representing the month of the year then prints
Programming Language: C#
- Using Visual Studios Write a program that accepts an integer between 1 and 12 representing the month of the year then prints the number of days in the respective month. For example, if 12 is entered the output should read: "December has 31 days." If a number other than 1-12 is entered print an error such as Invalid Entry for Month.
(NOTE: This program does not require a loop. However you may use one if you like.)
The number of days in each month of the year is:
- 31 January
- 28 February (Ignore leap year)
- 31 March
- 30 April
- 31 May
- 30 June
- 31 July
- 31 August
- 30 September
- 31 October
- 30 November
- 31 December
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
