Question: Using the While loop create a script that accepts a year input and loops through that year until the current year. This script should

Using the While loop create a script that accepts a year input

Using the While loop create a script that accepts a year input and loops through that year until the current year. This script should also count how many leap and common years there are between the input year and the current year. Sample input: 2000 1990 Sample output: 6 leap years and 15 common years from 2000 to 2020. 8 leap years and 23 common years from 1990 to 2020.

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!