Here is question:
Write a program that reads a string from the user containing a date in the form
mm/dd/yyyy. It should print the date in the form March 12, 2012.
#include<iostream>
using namespace std;
int main()
{
int mon;
int day;
int year;
string month[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
//the array is for another part of the program that i have not worked out yet
cout << "Enter a date in the form MM/DD/YYYY: ";
cin >> mon >> day >> year;
cout << mon << "/" << day << "/" << year << endl;
system ("pause");
return 0;
}
my output when i enter date 12/12/2009:
Enter a date in the form MM/DD/YYYY: 12/12/2009
12/-858993460/-858993460