#include <iostream>
#include <iomanip>
using namespace std;
enum Month {JANUARY = 1, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY,
AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER};
int main(){
int MM, DD, YYYY;
cout << "This will convert your input of the date to a different format"
<< endl;
cout << "Enter a date: ";
cin >> MM;
cin.ignore(2, '/') << endl;
cin << DD;
cin.ignore(2, '/') << endl;
cin << YYYY << endl;
string Month;
switch(MM)
{
case 1:
Month = "January";
break;
case 2:
Month = "Febuary";
break;
case 3:
Month = "March";
break;
case 4:
Month = "April";
break;
case 5:
Month = "May";
break;
case 6:
Month = "June";
break;
case 7:
Month = "July";
break;
case 8:
Month = "August";
break;
case 9:
Month = "Spetember";
break;
case 10:
Month = "October";
break;
case 11:
Month = "November";
break;
case 12:
Month = "December";
break;
}
Then output it like:
[code]cout << Month << DD << YYYY;
Its a code where you input a date like "1/6/2013" and convert it to print text "Febuary 6 2013. I think have some debug issues and stuff.
I actually wrote a class for this. It could calculate any date (=/- the number of days from today) with 100% accuracy (2,000 years from now accuracy!! xD)
It's really simple: Write the intrsuctions you use to calculate the date.