Question: Refer to the attached file Write a MATLAB script that solves the following problem and submit your code to the drop box 'Lab Exercise Final'

Refer to the attached file  Refer to the attached file Write a MATLAB script that solves

Write a MATLAB script that solves the following problem and submit your code to the drop box 'Lab Exercise Final' at Desire2Learn by 3:30pm on March 22nd, 2017. A leap year is a year containing an extra day in order to keep the calendar year synchronized with the astronomical year. We generally stick the extra day in February, so that about every 4 years, there are 29 days in February instead of 28 days. More specifically, the rules for assigning leap years are as follows (for the Gregorian calendar): All years evenly divisible by 400 are leap years; Years divisible by 4 but not 100 are leap years; All other years are not leap years. Write a MATLAB script that requests the user input on a starting year (e.g., 2000) and an ending year (e.g.. 3000). and then check whether each year in this range is a leap year. Your program should display some messages in the following format: Year 2000: Leap year Year 2001: Not leap year Year 2999: Not leap year Year 3000: Not leap year at the end, your program should output how many leap years in the above defined range in a message as follows, where the content in the angle brackets should be replaced by the user input and the calculation result of your script: For years between and : leap years

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!