Exemplo n.º 1
0
main()
{
    int year;

    GiveInstructions();
    year = GetYearFromUser();
    PrintCalendar(year);
}
Exemplo n.º 2
0
int main()
{
	SetWindowSize(9, 5);
	InitGraphics();
	Welcome();
	GiveInstructions();
	return 0;
}
Exemplo n.º 3
0
int main()
{
	while (true) {
		//initialize
		Randomize();
		Set<string> wordsSeen;
		Lexicon lex("lexicon.dat");
		Grid<string> board(4,4);			//changes for 5x5
		SetWindowSize(9, 5);
		InitGraphics();
		DrawBoard(4,4);						//changes for 5x5
		Welcome();
		GiveInstructions();
		
		//either set up the board automatically or let the user set it up
		cout << "Would you like to configure the board? ";
		string response = GetLine();
		response = ConvertToUpperCase(response);
		if (response == "YES") {
			UserConfigureBoard(board);
		} else {
			InitializeBoard(board);
		}
		
		//have the player play, then the computer
		PlayerTurn(board, lex, wordsSeen);
		ComputerTurn(board, lex, wordsSeen);
		
		//check if the user wants to play again
		cout << "Would you like to play again? ";
		response = GetLine();
		response = ConvertToUpperCase(response);
		if (response != "YES") break;
	}
	return 0;
}
Exemplo n.º 4
0
int main(){
    GiveInstructions();
    CollectInfo();    
    string result = CheckInfo();
    printf("%s您好,身高%.2fm,体重%.2fkg,计算结果:%s\n",name,height,weight,result);
}