Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB Help: Cell Arrays Thank you for the help! :) 2. (30 pts) Write a program that prompts for the month and the year, and
MATLAB Help: Cell Arrays
Thank you for the help! :)
2. (30 pts) Write a program that prompts for the month and the year, and then display how many days in that month. The input for the month should be an integer between 1 and 12; the input for the year must be positive integer. Your program will trap the user for bad input. Do count for leap years. You have already created a function, daysinmonthO, that will return how many days in a month in a year. Feel free to call the function. Months should be represented by their names, not a numeric value. Instead of using an IF statement, you should create a cell array that stores all 12 month names, and reference it. Enter the month: 13 Try again. Enter a whole number between 1 and 12: 3 Enter the year (YYYY): 2016 There are 31 days in March, 2016Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started