PLEASE ANSWER ASAP !!! 1) Write a C++ program to determine tomorrow's date (next day's) if today's date is an input pro

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

PLEASE ANSWER ASAP !!! 1) Write a C++ program to determine tomorrow's date (next day's) if today's date is an input pro

Post by answerhappygod »

PLEASE ANSWER ASAP !!!
1) Write a C++ program to determine
tomorrow's date (next day's) if today's date is an input
provided by the user. Your program should be able to accept any
date as input ( dd mm yyyy) and provide next day's date as an
output. You need to define Date class with the required
data members (day, month, year), Constructor(s) and other
member functions.
input: 27 04 2022
output: 28 04 2022
PLEASE USE:
int main()
{
Date today, tomorrow;
today.getDate();
tomorrow.findTomorrowDate(today);
tomorrow.showDate();
return 0;
}
2) Then write a C++ program to find the next
time if the time now is given (in 24 hours format). program should
be able to accept any time as input ( hh mm ss) and provide next
time as an output. You need to define time class with
the required data members (hour, minute, second ),
Constructor(s) and other member functions.
input: 23 59 59
output: 00 00 00
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply