|
|
|
|
|
|
|
int main()
{
Months month;
GetMonth (month);
switch (month)
{
case JANUARY : PrintJanuary();
break;
case FEBRUARY : PrintFebruary();
break;
case MARCH : PrintMarch();
break;
case APRIL : PrintApril();
break;
case MAY : PrintMay();
break;
case JUNE : PrintJune();
break;
case JULY : PrintJuly();
break;
case AUGUST : PrintAugust();
break;
case SEPTEMBER : PrintSeptember();
break;
case OCTOBER : PrintOctober();
break;
case NOVEMBER : PrintNovember();
break;
case DECEMBER : PrintDecember();
}
return 0;
}
//******************************************************************
void GetMonth( /* out */ Months& month ) // User's desired month
// Inputs a month after prompting the user
// Postcondition:
// User has been prompted to enter a month
// && Only the characters needed to determine the month are read
// (the remaining characters on the input line are read and
// discarded)
// && month == value of type Months corresponding to user's input
|
|
|
|
|
|