Question: IF and IF - ELSE STATEMENTS ( Scalar data ) Create a FUNCTION file called leapVear.m in which we will solve the following problem: Write

IF and IF-ELSE STATEMENTS (Scalar data) Create a FUNCTION file called leapVear.m in which we will solve the following problem:
Write a program that accepts a ycar and determines whether or not the year is a leap year. Use the mod function. The output should be the variahle extra_day, which should te I if the year is a leap year and O otherwise. The rules for degermining leap years in the Cirgoriun calendar are:
All years evenly divisible by 400 are leap ycars.
2 Years cvenly divisible by 100 but noi by 400 are rot leap ycars.
3. Years divisible by 4 but not by 100 are leap years.
4. All caher years are not leap years.
For example, the years 1800,1900,2100,2300, and 2500 are not lesp years, but 2400 is a leap year.
IF and IF - ELSE STATEMENTS ( Scalar data )

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 Programming Questions!