Use Matlab to write the following
1. Write code to determine whether a year is a leap year. Usethe mod function. The rules for determining leap years in theGregorian calendar are as follows:
All years evenly divisible by 400 are leap years.
Years evenly divisible by 100, but not by 400, are not leapyears.
Years divisible by 4, but not by 100, are leap years.
All other years are not leap years.
For example, the years 1800, 1900, 2100, 2300 and 2500 are notleap years, but 2400 is a leap year.
2. Solve the following:
a. Use a for loop to determine the sum of the first 10 terms inthe series 5k3, where k=1,2,3,...,10.Report your answer to the Command Window.
b. Repeat part (a) without using a loop.