/******************************************************************************************** Name of Program: Date Converter v1.0 Name of file: Question1.cpp What the program does: Reads in format1 and prints that date in format2 format1 format2 07/21/55 July 21, 1955 Creator Name: Tom Kralidis Date: December 10, 1998 Miscellaneous: Program prompts user to enter date, then converts it to format2 ********************************************************************************************/ #include int main() { int m, d, y; char *month[12]= {"January","February","March","April","May","June","July","August","September","October","November","December"}; //array: note that January is 0, December is 11 cout << "Welcome to the Date Converter!\n\n"; cout << "\nEnter date: \n\nmm/dd/yy\n\n"; cin >> m; cin.ignore(); //ignores slash character cin >> d; cin.ignore(); cin >> y; cin.ignore(); --m; //decrements m by one to correspond with the above array element values cout << "\n\nThe converted date is " << month[m] << " " << d << ", 19" << y << "\n\n"; return 0; }