Thread
:
The Ctrl+V game!!!!
View Single Post
Potironette
petite fantaisiste
#
1047
#include <iostream>
#include <string>
using namespace std;
int main()
{
string response;
cout << "You reach a crossroads. \nEnter 1 to turn right. \nEnter 2 to turn left. \nEnter 3 to sit down." << endl;
getline( cin, response, '\n' );
if ( response == "1" )
{
cout << "You turn right..." << endl;
}
else if ( response == "2" )
{
cout << "You turn left..." << endl;
}
else
{
for ( int gametime = 0; gametime != 10; gametime++ )
{
cout << "You sit down and watch the breeze. \nSome time has passed." << endl;
cout << "You reach a crossroads. \nEnter 1 to turn right. \nEnter 2 to turn left. \nEnter 3 to sit down." << endl;
getline( cin, response, '\n' );
if ( response == "1" || "2" || "sleep" )
{
break;
}
}
if ( response == "1" )
{
cout << "You turn right..." << endl;
}
else if (response == "2" )
{
cout << "You turn left..." << endl;
}
else
{
cout << "Stop messing around hero! You've wasted a day already!" << endl;
}
}
}
Put it in spoilers, but it isn't that long.
I was messing around with something that I did wrong.
Posted 02-20-2017, 08:31 PM