So, I'm completely new to C++ and I chose it as my first programming language. Now I've decided on this one and I realize how powerful and hard this language might be to learn but none the less i'd like to get good at how to program in it, so I want to stick to C++. So I've been writing beginning programs with nano and compiling with g++, and I'm reading out of a book which is programming principles and practices by Bjarne Stroustrup. So I wrote this little code but what I want it to do is recognize the answer and give me a different option.
Would you like to play a game? y/n
so if you where to answer no it would give you a different option like:
What would you like to do?
or if you answered yes it would give something like:
What game would you like to play?
I'd also like to say in advance that i'm sorry if this post is on somewhere else but I haven't been able to find the answer for this particular question, here is the code I have written, I got the idea from a 1980's movie called war games lol.
using namespace std;
cout<<"hello, please enter your first and last name and age\n";
cout<<"Would you like to play a game?\n";
cout<<"What game would you like to play?" " name"<<name<<"?\n";
cout<<"Would you like to go first?\n";