How can I have a different output based of input?

#include <iostream>
#include <string>
using namespace std;

int main ()
{

string mystr;
cout <<"What is your name?";
getline (cin, mystr);
cout <<"Hello " << mystr << ", nice to meet you.\n";
cout <<"What is your favorite TV show?";
getline (cin, mystr);
cout <<"I like " << mystr <<" too!\n";
cout <<"How are you today?";

return 0;

}

For example, When it asks you "how are you today" How do I have it respond differently, depending on if you answer "good" or "bad"[/b]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <string>
using namespace std;

int main()
{
	string mystr;
	cout << "How was your day?" << endl;
	cin >> mystr;

	if(mystr == "good")
	{
		cout << "That's good" << endl;
	}
	
	if(mystr == "bad")
	{
		cout << "That's bad" << endl;
	}

	return 0;
}
Thanks a lot!
Topic archived. No new replies allowed.