I'm asking the user if they are ready to begin.
Even when I press N, it runs it.Code:#include <iostream.h> int main() { int a; // start; int answer_one; // answer to number one int answer; cout << "Welcome to History Quiz!. This qui will test your knowledge on various history topics." << endl; cout << "Ready to start? Y for yes, N for no." << endl; cin >> a; if ( a == 'Y') { cout << "What was the name of the treaty that ended World War I?" << endl; cout << "A - Treaty of Paris" << endl; cout << "B - Treaty of Versailles" << endl; cout << "C - Adams-Onís Treaty" << endl; cout << "D - Treaty of Mutual Cooperation and Security between the United States and Japan" << endl; cin >> answer_one; switch (answer_one) { case 1: answer = 'A'; break; case 2: answer = 'B'; break; case 3: answer = 'C'; break; case '4': answer = 'D'; break; } } else { cout << "See you later!" << endl; return 0; }