#include #include using namespace std; // Convert dates like January 12, 2001 // to 01/12/01 // a PARTIAL solution int main() { // Read the input string strMonth; int day, year, month; char junk; cout << "Please enter date:"; cin >> strMonth >> day >> junk >> year; // Convert to numeric values if (strMonth == "January") month = 1; else if (strMonth == "April") month = 4; else if (strMonth == "December") month = 12; // Output cout << "Month is: "; if (month < 10) cout << "0" << month; else cout << month; return 0; }