All pastes #985767 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-15 09:21 UTC
rendered paste body
int holidayMenu( char );
//---------------------------------------------------------------------------

#pragma argsused
int main(int argc, char* argv[])
{
	char choice;

	while ( choice != 113 )
	{
		holidayMenu( choice );

		switch ( choice )
		{
			case 's':
				cout << "You selected Sweden";
				break;

			case 'j':
				cout << "You selected Japan";
				break;

			case 'f':
				cout << "You selected Fiji";
				break;

			case 'c':
				cout << "You selected Canada";
				break;

			case 'k':
				cout << "You selected Korea";
				break;
		}



	}





	return 0;
}
//---------------------------------------------------------------------------
//
//
//
//
//---------------------------------------------------------------------------
int holidayMenu( choice )
{

	cout << endl << "Please select a holiday destination:" << endl << endl <<
	"Enter S if you wish to visit Sweden" << endl <<
	"Enter J if you wish like to visit Japan" << endl <<
	"Enter F if you wish like to visit Fiji" << endl <<
	"Enter C if you wish like to visit Canada" << endl <<
	"Enter K if you wish like to visit Korea" << endl <<
	"Or enter QUIT if you wish to exit" << endl << endl << ":";
	choice = getch();

	return choice;
}