A fun and interactive console-based quiz game where players solve math problems in multiple levels! ๐
This C++ project simulates a Math Quiz game ๐ง , where players answer questions with different difficulty levels (Easy, Medium, Hard, and Mixed). Players can choose the number of questions and the type of mathematical operation (Addition, Subtraction, Multiplication, Division, or Mixed). The game checks the answers and provides real-time feedback. Players are given the option to replay the game.
- ๐ง Multiple Difficulty Levels: Choose from Easy, Medium, Hard, or Mixed levels.
- โ Various Operations: Add, subtract, multiply, divide, or a mix of them!
- ๐ Real-Time Feedback: Instant response to answers, with correct and incorrect indications.
- ๐จ Dynamic Console Colors: Green for correct answers, Red for wrong ones.
- ๐ Final Score Summary: A final report of correct and wrong answers, showing whether the player passed or failed.
- ๐ Replay Option: Play as many games as you want with a replay prompt.
- ๐ค Randomized Questions: The game generates random numbers for each question, ensuring unique quizzes every time.
-
Player Input:
- The player selects the number of questions, difficulty level, and operation type.
- The player answers math questions, which vary based on difficulty and operation type.
-
Question Generation:
- Random Numbers: Each question consists of two numbers chosen randomly within specific ranges based on the difficulty.
- Operations: The program can generate addition, subtraction, multiplication, division, or random combinations.
-
Answer Checking:
- After the player answers, the program checks the correctness of the answer.
- Results are displayed immediately with color feedback (Green for correct, Red for wrong).
-
Scoring and Summary:
- The total number of correct and wrong answers are tracked.
- The playerโs result is displayed as either "PASS" or "FAIL" based on the number of correct answers.
This project helps you explore and implement various C++ programming concepts:
- โ Enums and Structs: Organizing game elements efficiently.
- โ Functions: Ensuring modularity and reusability for game logic.
- โ Random Number Generation: Adding unpredictability to gameplay.
- โ Control Structures: Utilizing loops and conditionals for decision-making.
- โ Console Formatting: Using colors and formatted output to enhance interactivity.
Clone this repository, compile the code, and start challenging the computer!๐