Question: Using a for loop, write a program where given an array of 3 different years, the output will be either year so and so is

Using a for loop, write a program where given an array of 3 different years, the output will be either year so and so is a leap year or year so and so is not a leap year based on:
1. All years divisible by 400 are leap years
2. All years divisible by 4 but not by 100 are leap years
3. All years divisible by 100 but not by 400 are not leap years
4. All other years are not leap years
Test your program with the following array
A =[1700,1804,2024]

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!