Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ please Problem B: Days until Summer Write a program that lets you enter two dates: a start date and end date. Then find

image text in transcribed

in c++ please

Problem B: Days until Summer Write a program that lets you enter two dates: a start date and end date. Then find the number of days between them. You may assume only valid dates are entered, but you should account for the case when the start date is after the end date (example 4). Hints: You should have worked on some lab problems that you can use as a starting place for thinking about this problem. If choose to re-use lab code in this problem Please use a comment to indicate who your lab partner was This will help avoid awkward conversations when your submission shares code with your lab partner. We do not recommend the mathematical approach - calendars were not designed by math- ematicians (especially leap years) and it's remarkably hard to make this approach work. Instead we recommend trying a more function focused approach. As a further hint here - this problem is rather straightforward if you can have a function that will "update" take, and update, day, month, and year variables to represent the next calendar day. (This would have to be a reference parameter function to behave that way). Some of the logic for writing such a function was already explored in lab. You should have worked on a lab problem earlier in the semester in which we looked into calendar dates (I seem to recall functions for "is leap year", and programs working towards "next day" etc) Starting from this code is both allowed, and helpful. Example 1 (user input is underlined for clarity, underlined text in your program is not needed). Further note that PDFs will sometimes use 2 spaces where our code only uses 1. (In general I do not recommend copy/pasting from PDFS) Enter start date (no spaces): 2/27/2020 Enter end date (no spaces): 5/12/2020 You have to wait 75 days

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

Who is involved?

Answered: 1 week ago