Can someone make it so that instead of typing in 1 and 2 that they actually type in the answer like yes or no? here is the code.
CODE
#include<iostream>
using namespace std;
int main(void)
{
beginning:
system("TITLE The Amazing Adventure");
double dfirstquestion;
double dsecondquestion;
double dthirdquestion;
double dfourthquestion;
double dfifthquestion;
double dsixthquestion;
double dseventhquestion;
cout << "You are about to embark on a very dangerous adventure." << endl;
cout << "Would you like to go? (1 is for yes, 2 is for no)" << endl;
cin >> dfirstquestion;
if(dfirstquestion == 1){
system("CLS");
cout << "You sail to the king of the land to get the permission." << endl;
system("PAUSE");
goto question2;
}else{
system("CLS");
cout << "That's too bad, we are going to have to kill you." << endl;
system("PAUSE");
goto exit;
}
exit:
system("CLS");
cout << "You get your head chopped off." << endl;
system("PAUSE");
return 0;
question2:
system("CLS");
cout << "Congradulations, you got the permission." << endl;
system("PAUSE");
system("CLS");
cout << "The king tells you to go to the hidden tunnel and find the lost golden treasure." << endl;
system("PAUSE");
system("CLS");
cout << "Do you want to go now or wait for tommorow to come?" << endl;
cout << "(1 is for wait, 2 is for go now)" << endl;
cin >> dsecondquestion;
if(dsecondquestion == 1){
system("CLS");
cout << "you wait for morning to arrive." << endl;
system("PAUSE");
system("CLS");
cout << "You wake up bright and early and get going." << endl;
system("PAUSE");
goto question3;
}else{
system("CLS");
cout << "You get going right then to get an early start." << endl;
system("PAUSE");
goto question3;
}
question3:
system("CLS");
cout << "You arrive at your destination, the island of no return." << endl;
system("PAUSE");
system("CLS");
cout << "It was a very long trip, do you want to take a break and wait for morning?" << endl;
cout<< "(1 is for wait, 2 is for go now)" << endl;
cin >> dthirdquestion;
if(dthirdquestion == 1){
system("CLS");
cout << "You find a very dry tree and go to sleep" << endl;
system("PAUSE");
system("CLS");
cout << "You wake up to find that, oh no! Something has stolen some of your food while you were alseep." << endl;
system("PAUSE");
system("CLS");
cout << "You continue even though you are low on food." << endl;
system("PAUSE");
goto question4;
}else{
system("CLS");
cout << "You start walking toward the cave." << endl;
system("PAUSE");
goto question4;
}
question4:
system("CLS");
cout << "You find the cave, would you like to wait for morning?" << endl;
cout << "(1 is for wait, 2 is for go now)" << endl;
cin >> dfourthquestion;
if(dfourthquestion == 1){
system("CLS");
cout << "You fall asleep by the torch, that should keep all the bugs away." << endl;
system("PAUSE");
system("CLS");
cout << "You wake up, grab the torch, and get ready to go into the cave." << endl;
system("PAUSE");
goto question5;
}else{
system("CLS");
cout << "You grab the torch and get ready to go into the cave." << endl;
system("PAUSE");
goto question5;
}
question5:
system("CLS");
cout << "You see some bats ahead, do you want to abandon the quest or fight your fear?" << endl;
cout << "(1 is for go home, 2 is for fight your fear)" << endl;
cin >> dfifthquestion;
if(dfifthquestion == 1){
system("CLS");
cout << "I wonder if the king is going to be mad." << endl;
system("PAUSE");
goto badanswer;
}else{
system("CLS");
cout << "Good, we will continue. You are the bravest in the land." << endl;
system("PAUSE");
goto question6;
}
badanswer:
system("CLS");
cout << "You dare defy my orders becuase of bats!" << endl;
cout << "Off with his head!" << endl;
goto exit;
question6:
system("CLS");
cout << "You brave the bats and then find the treasure." << endl;
system("PAUSE");
system("CLS");
cout << "Do you want to grab it or do you think it is a trap?" << endl;
cout << "(1 is for grab it, 2 is for you think it is a trap)" << endl;
cin >> dsixthquestion;
if(dsixthquestion == 1){
system("CLS");
cout << "You grab the treasure anxiously and get chopped in half." << endl;
system("PAUSE");
system("CLS");
cout << "GAME OVER!" << endl;
return 0;
}else{
system("CLS");
cout << "You throw a stick at the treasure, knocking it over." << endl;
system("PAUSE");
system("CLS");
cout << "A giant saw comes out and misses you." << endl;
system("PAUSE");
system("CLS");
cout << "YAY!!! You got the treasure." << endl;
system("PAUSE");
goto question7;
}
question7:
system("CLS");
cout << "You sail back to the king and give him the treasure." << endl;
cout << "He is very pleased with you and offers you money." << endl;
system("PAUSE");
system("CLS");
cout << "Would you like to take the money?" << endl;
cout << "(1 is for yes, 2 is for no)" << endl;
cin >> dseventhquestion;
if(dseventhquestion == 1){
system("CLS");
cout << "You are rich! Good job!" << endl;
system("PAUSE");
system("CLS");
cout << "If you would like to go on another adventure, try out The Amazing Adventure 2." << endl;
system("PAUSE");
return 0;
}else{
system("CLS");
cout << "You tell him no, and he thanks you." << endl;
system("PAUSE");
system("CLS");
cout << "If you would like to go on another adventure, try out The Amazing Adventure 2." << endl;
system("PAUSE");
return 0;
}
}
Thank You in advance