Question: write program in C++ Write a program that will read in a date(in the form of three integers values: month, day, year) and tell the

write program in C++write program in C++ Write a program that will read in a

Write a program that will read in a date(in the form of three integers values: month, day, year) and tell the user which day of the year that date is. For example, 1/1/2019 is day #1 of the year. 12/31/2019 is day #365 of the year. And 12/31/2020 is day #366 of the year, because it is a leap year. A year is a leap year, if that number is evenly divisible by 4. Except that any year evenly divisible by 100 is ONLY a leap year if it is also evenly divisible by 400. . . Your program should include the following: Prompt the user and read in three ints: month, day and year(all four digits of the year). Your program should have a user-defined function called determineLeapYear that will return an int to main. determineLeapYear will have one input from main as a parameter: the year entered by the user. The function should determine if the year entered by the user is a leap year or not. If it is a leap year, then the function should return a 1. If it is not a leap year, the function should return a 0. In main, the program should determine what day of the year the user entered date is. Your output should look like the following: 3/2/2020 is day 52 of the year. Or 5/1/2019 is day 120 of the year. Some things you need to know: Months with 31 days: January, March, May, July, August, October, December Months with 30 days: April, June, September, November February has 28 days on non-leap years. February has 29 days on leap years. Run your program two times, using the following data: A. 10 / 30 / 2020 B. 10/3/2019

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!