Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use this site to follow style guide for C++ csci235.herokuapp.com/style-guide DESCRIPTION Write a program that prompts the user to enter the date in mm/dd/yyyy format.

use this site to follow style guide for C++
csci235.herokuapp.com/style-guide image text in transcribed
DESCRIPTION Write a program that prompts the user to enter the date in mm/dd/yyyy format. The program should use a single input statement to accept the date, storing each piece of the date into an appropriate variable. Demonstrate that the input was obtained correctly by outputting the month day, and year to the screen as shown in the example output below. Sample Output (user input is in yellow) Enter date (mm/dd/yyyy): 2/06/2021 Month entered: 02 Day entered: 86 Year entered: 2021 Although the user entered 4. C. drops the e as insignificant when the program outputs the value. After getting your program working, adjust the output to always output two-digit months and days. For example, 04 should output as 04 and 10 should output as 10 (not 010). You must store the input as int values, do NOT use string variables. Hint You will need two parameterized manipulators that we talked about from the iomanip library. Think about the fact that you always want to characters, but it the input is a single digit, then the other character needs to be a "e" instead of a Name your source code fie DatePicker.cpp Note to avoid conflicts with system programs do not name your executable time or "date" Remember to review the coding standard checklist before submitting, use the sive Checker and document your code with comments

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

Step: 3

blur-text-image

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions