Quiz Program in C++
Let us create a game project in c++. It is a quiz program, which asks the player and make them choose one out of four options. It saves the score and finally it displays the result. C++ code: #include <iostream> #include <string> using namespace std; int main() { int score = 0; string ans; cout << "Welcome to the Game of Quiz!\n"; cout << "--------------------------\n\n"; // first question cout << "Q1: What is the capital of India?\n"; cout << "a) New Delhi \nb) Madras \nc) Pondicherry \nd) Mumbai \n"; cout << "choose Your answer: "; cin >> ans; if (ans == "a" || ans == "A") { cout << "Yes. You are Correct!\n\n"; ...