How to go to a previous line
So here's what I've made so far:
Code:
#include <iostream>
using namespace std;
int main()
{
int wheretogo;
int psactivity;
int pcactivity;
cout<<"You are in a house with a PC and PlayStation 3 with two games. What do you do?\n\n";
cout<<"\nGo to the PlayStation 3 (1)\n\n";
cout<<"\nGo to the PC (2)\n\n";
cin>>wheretogo;
cin.ignore();
if (wheretogo == 1 ) {
cout<<"\nYou go to the PlayStation and boot it up.\n\n";
cout<<"\nCheck the PlayStation Store (1)\n\n";
cout<<"\nCheck the available games(2)\n\n";
cin>>psactivity;
cin.ignore();
}
if (wheretogo == 2 ) {
cout<<"\nYou go to the PC and boot it up.\n\n";
cout<<"\nGo on the internet (1)\n\n";
cout<<"\nPlay Portal (2)\n\n";
cin>>pcactivity;
cin.ignore();
}
}
Just some random text "game" I made. Here's the problem: I want an option to go back. Let's say the user chose go the playstation and use the playstation store or something, how can I include the option to go back and use the PC instead after he chose to go to the playstation?