1.
Start Visual Studio 2012 and create a new CLR Console Application project. Name the applica-
tion CalendarAssistant.
2.
At the top of the source code file, immediately below the using namespace System; line, add
the following function prototypes (you will implement all these functions during this chapter):
int GetYear();
int GetMonth();
int GetDay(int year, int month);
void DisplayDate(int year, int month, int day);
3.
At the end of the file, after the end of the main function, implement the GetYear function as
follows:
int GetYear()
{
Console::Write("Year? ");
String ^input = Console::ReadLine();
int year = Convert::ToInt32(input);
return year;
}
Do'stlaringiz bilan baham: |