An interactive console-based math quiz game built in C++ that challenges players with randomly generated arithmetic questions. Players can select difficulty levels and operation types, and the game provides real-time feedback with color-coded results. ๐จโ โ
โ
Play up to 100 questions per round
โ
Choose from Easy, Medium, Hard, or Mixed difficulty levels
โ
Supports Addition (+), Subtraction (-), Multiplication (*), and Division (/)
โ
Randomized questions for a unique experience each time
โ
Color-coded feedback:
- ๐ฉ Green for correct answers
- ๐ฅ Red + Sound for incorrect answers
- ๐จ Yellow for a draw
โ Final score summary
โ Option to play again
1๏ธโฃ Run the program
2๏ธโฃ Choose the number of questions (1 to 100)
3๏ธโฃ Select a difficulty level:
1
for Easy2
for Medium3
for Hard4
for Mixed
4๏ธโฃ Pick an operation type:1
for Addition (+)2
for Subtraction (-)3
for Multiplication (*)4
for Division (/)5
for Mixed Operations
5๏ธโฃ Answer the generated questions
6๏ธโฃ View your final results
7๏ธโฃ Play again or exit
- Random Number Generator: Generates random numbers based on the difficulty level
- Game Logic: Uses an enum-based system to structure operations
- User Input Handling: Ensures valid input for questions and difficulty
- Structured Design: Organized using functions, structs, and enums
- Console Formatting: Colors and formatting enhance user experience
- Language: C++
- Concepts: Loops, Functions, Structs, Enums, Randomization
- Libraries:
<iostream>
,<cstdlib>
,<ctime>
,<string>
- Practice C++ enums, structs, and functions
- Understand random number generation
- Improve user input validation and console formatting
- Learn to implement interactive CLI-based games
This project is open-source. Feel free to fork, modify, and improve it! ๐
Contributions are welcome! If you have improvements, submit a Pull Request ๐
๐ Enjoy the challenge! Happy coding! ๐ฎ๐ฏ