Question: C++ please! Thank you! Create a program that decides if a given input year is a leap year. A year is a leap year if

 C++ please! Thank you! Create a program that decides if a

C++ please! Thank you!

Create a program that decides if a given input year is a leap year. A year is a leap year if it's divisible by four, except that any year divisible by 100 is a leap year only if it's also divisible by 400. Display an error message if the given year is less than 1 or greater than 10000. Example Output for Program 1 With 1996 given as input Please give a year: 1996 1996 is a leap year With 2100 given as input Please give a year: 2100 2100 is not a leap year With 12345 given as input Please give a year: 12345 Error, 12345 is not a valid year. For full credit, your output should match exactly for the given input. Your code must also be valid for all other inputs too. Program 2 Create a program that sums all odd numbers between a and b (inclusive) using a for loop, where a and b are inputs. If a is greater than b, start from b instead. Example Output for Program 2 With 2 given as input a and 6 given as input b Please give a start number: 2 Please give an end start number: 6 The sum of all odd numbers between a and b (inclusive) is: 8 With 6 given as input a and 2 given as input b Please give a start number: 6 Please give an end start number: 2 The sum of all odd numbers between a and b (inclusive) is: 8 For full credit, your output should match exactly for the given input. Your code must also be valid for all other inputs too

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