i dont like what it is doing. the user type in "A" and it answers the first one but it also answers the second one. i want it to answer the first and then wait and give it choices for the second one and then answer that one but it answers both. ho can i stop that from happening
#include <iostream>
usingnamespace std;
int main()
{
string answer;
cout << "This Is A Short Game" << endl;
cout << "Choices: A,B,C,D" << endl;
cout << "YOU ARE WALKING HOME FROM SCHOOL AND YOU SEE A DOG" << endl;
cout << "A: Walk Up To It And Pet It" << endl;
cout << "B: Continue Walking Home" << endl;
cin >> answer;
if (answer=="A") {
cout << "YOU START WALKING TO THE DOG, IT LOOKS UP AT YOU SCARED" << endl;
}
cout << "A: PET IT" << endl;
if (answer=="A") {
cout << "YOU PET THE DOG IT BARKS AND WAGS IT'S TAIL IN EXCITEMENT" << endl;
}
return 0;
}