|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
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: 32: 33: 34: 35: 36: 37: 38: |
#include <iostream>
#include <string>
using namespace std;
//string nameofgame;
void rewardmsg(string nameofgame)
{
//cout << nameofgame + "2" << endl;
const string reward = "You're right!! The name of this game is "+nameofgame+"!";
// second and fourth lines of reward message
const string spaces(reward.size(), ' ');
const string second = "* " + spaces + " *";
// 1st and fifth lines of reward message
const string first(second.size(), '*');
cout << endl;
cout << first << endl;
cout << second << endl;
cout << "* " << reward << " *" << endl;
cout << second << endl;
cout << first << endl;
}
int main ()
{
string row(19, '.');
for (int i = 0; i < 19; ++i) { cout << row << endl; } // make a board
cout << "What is the name of the game? ";
string nameofgame;
cin >> nameofgame;
//cout << nameofgame + "1" << endl;
//rewardmsg(nameofgame);
if (nameofgame != "Go" || "go")
cout << "Incorrect!." << endl;
else
rewardmsg(nameofgame);
return 0;
}
|
Advertisement
| Hall of Fame |