i need help writing this code? thats what i have. it has some to do with it.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 a appropriate variable demonstrate that the input was obtained directly by outputting the month, day, and the year to the screen
int CurrentDate, Month, Day, Year;
std::cout << "Please enter a date in mmddyyyy format (Example: 06092014): ";
std::cin >> CurrentDate;
When you read in the CurrentDate, you need to parse the individual parts. There are multiple ways to do this. One way is to convert the integer into a string and create sub-strings. Once you have the individual substrings, you could print them back out with "/"s in between. It may not be the best way, but it is simple enough to follow.