Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a short C++ program that will prompt the user and input three integer valu

ID: 3671440 • Letter: W

Question

Write a short C++ program that will prompt the user and input three integer values (month, day, year) from the console in a "date" format that includes '/' separator characters. E.g., 8/21/2013. You program should then output the date as 3 integer values in year, month, day order separated by commas. Enter a date in mm/dd/yyyy format: 8/21/2013 year, month, day: 2013, 8, 21

Explanation / Answer

#include int main() { int d; int m; int y; std::cin >> d; // read the day if ( std::cin.get() != '/' ) // make sure there is a slash between DD and MM { std::cout > m; // read the month if ( std::cin.get() != '/' ) // make sure there is a slash between MM and YYYY { std::cout > y; // read the year std::cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote