1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main (int nNumberofArgs, char* pszArgs [] )
{
int month;
int day;
cout << "Enter the day of the month: ";
cin >> day;
cout << "Enter the Number of the Month: ";
cin >> month;
const std::string ordinals[] = { "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eight", "nineth", "tenth", "eleventh",
"Twelveth", "thirteenth", "Fourteenth", "Fiftheenth", "sixteenth", "sevententh", "Eighteenth", "Nineteenth", "twenteeth", "Twenty-first",
"Twenty-Second", "twenty-third", "twenty-fourth", "Twenty-fifth", "Twenty-sixth", "Twenty-Seventh", "Twenty-eight", "Twnety-ninth", "Thirthyth",
"Thirthyth-First" };
const std::string months[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October",
"November", "December"};
std::cout << "It's the " << ordinals[day - 1] << " of " << months[month - 1] << std::endl;
system ("PAUSE");
return 0;
}
|