Question: 2 5 . 1 9 PRACTICE: Branches * * : Next date LAB ACTIVITY 2 5 . 1 9 . 1 : PRACTICE: Branches *

25.19 PRACTICE: Branches**: Next date
LAB ACTIVITY
25.19.1: PRACTICE: Branches**: Next date
0/16
Many websites let users make reservations (hotel, car, flights, etc.). When a user selects a date, the next day is often automatically selected (for hotel checkout, car return, flight return, etc.). Given a date in the form of three integers, output the next date. If the input is 1152017, the output should be 1162017. If the input is 8312017, the output should be 912017. Ignore leap years.
Hints:
Group the months based on number of days. Then create an if-else statement for each case.
Note that 12(December) is a special case; after the last day, the next month is 1(January) and is the next year.

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!