Question: 6. (30 points) Develop a MATLAB function to determine whether a year is a leap year by following these steps 1. If the year is
6. (30 points) Develop a MATLAB function to determine whether a year is a leap year by following these steps 1. If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5 2. If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4 3. If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5. 4. The year is a leap year (it has 366 days, i.e., February month has 29 days). 5. The year is not a leap year (it has 365 days, i.e., February month has 28 days) Test it 1996, 2000, 2002, 2004, 2008, 2018, 2019, 2020 and 2021 Hint: Use mod (n,m) command to determine whether the number n is divisible by m or not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
