Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a C++ console application using Microsoft Visual Studio 16 or later. Write a C++ program that requests two dates from the user and then
Create a C++ console application using Microsoft Visual Studio 16 or later.
Write a C++ program that requests two dates from the user and then calculates and displays the number of weekends between those two dates. If either of the start or end dates is part of a weekend, you can count that as a whole weekend. A weekend need not include both Saturday and Sunday to be included. Results to check you program with: In 2019: Jan. 1 to Jan 31, 2019 contains 4 weekends Feb. 1 to Mar. 31, 2019 contains 9 weekends Jan. 14 to May 3, 2019 contains 15 weekends Mar. 1 to Oct. 31, 2019 contains 35 weekends In 2020: Jan. 1 to Jan. 31, 2020 contains 4 weekends Feb. 1 to Feb. 29, 2020 contains 5 weekends Jan. 1 to June 30, 2020 contains 26 weekends July 1 to Dec. 31, 2020 contains 26 weekends Jan. 1 to Dec. 31, 2020 contains 52 weekends Feb. 1 to Nov. 30, 2020 contains 44 weekends Write a C++ program that requests two dates from the user and then calculates and displays the number of weekends between those two dates. If either of the start or end dates is part of a weekend, you can count that as a whole weekend. A weekend need not include both Saturday and Sunday to be included. Results to check you program with: In 2019: Jan. 1 to Jan 31, 2019 contains 4 weekends Feb. 1 to Mar. 31, 2019 contains 9 weekends Jan. 14 to May 3, 2019 contains 15 weekends Mar. 1 to Oct. 31, 2019 contains 35 weekends In 2020: Jan. 1 to Jan. 31, 2020 contains 4 weekends Feb. 1 to Feb. 29, 2020 contains 5 weekends Jan. 1 to June 30, 2020 contains 26 weekends July 1 to Dec. 31, 2020 contains 26 weekends Jan. 1 to Dec. 31, 2020 contains 52 weekends Feb. 1 to Nov. 30, 2020 contains 44 weekendsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started