#include "stdafx.h" #include #include using namespace std; int main() { string answer; int redScore; int blueScore; int yellowScore; redScore = 0; blueScore = 0; yellowScore = 0; /********** QUESTION #1 START *******************/ cout << "Which color do you prefer?\n"; cout << "A) Red\n"; cout << "B) Blue\n"; cout << "C) Yellow\n"; cout << "Please enter A-C: "; cin >> answer; if ((answer == "A") || (answer == "a")) { redScore = redScore + 1; }else if ((answer == "B") || (answer == "b")) { blueScore = blueScore + 1; }else if ((answer == "C") || (answer == "c")) { yellowScore = yellowScore + 1; } else { cout << "You didn't answer A-C\n"; } /********** QUESTION #1 END *******************/ cout << "Which color do you prefer?\n"; cout << "A) Purple\n"; cout << "B) Orange\n"; cout << "C) Green\n"; cout << "Please enter A-C: "; cin >> answer; if ((answer == "A") || (answer == "a")) { redScore = redScore + 1; blueScore = blueScore + 1; } else if ((answer == "B") || (answer == "b")) { redScore = redScore + 1; yellowScore = yellowScore + 1; } else if ((answer == "C") || (answer == "c")) { yellowScore = yellowScore + 1; blueScore = blueScore + 1; } else { cout << "You didn't answer A-C\n"; } /* MORE QUESTIONS GO HERE ..... */ cout << "Your red score is " << redScore << "!\n"; cout << "Your blue score is " << blueScore << "!\n"; cout << "Your yellow score is " << yellowScore << "!\n"; cout << "The highest score indicates your favorite color!\n"; return 0; }