Write a program that accepts a date from the user in the formmm/dd/yyyy and then
ID: 3614587 • Letter: W
Question
Write a program that accepts a date from the user in the formmm/dd/yyyy and then displays it in the form month dd, yyyy, wheremonth is the name of the month: Enter a date (mm/dd/yyyy) : 2/17/2011 You entered the date February 17 , 2011 Store the month names in an array that contains pointers tostrings. Write a program that accepts a date from the user in the formmm/dd/yyyy and then displays it in the form month dd, yyyy, wheremonth is the name of the month: Enter a date (mm/dd/yyyy) : 2/17/2011 You entered the date February 17 , 2011 Store the month names in an array that contains pointers tostrings.Explanation / Answer
please rate - thanks #include #include using namespace std; int main() {string input; stringmth[12]={"January","February","March","April","May","June","July", "August","September","October","November","December"}; int month, day, year,i; coutinput; i=0; month=0; while(input[i]!='/') {month=month*10+input[i]-48; i++; } i++; day=0; while(input[i]!='/') {day=day*10+input[i]-48; i++; } i++; year=0; while(input[i]!='') {year=year*10+input[i]-48; i++; } coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.