A console-based Math Game implemented in C++.
Math Game generates random arithmetic questions based on the selected difficulty level and operation type. The player answers each question, receives immediate feedback, and gets a final result summary at the end of the round.
- Multiple questions in one round
- Random question generation
- Easy, Medium, Hard, and Mixed difficulty levels
- Addition, Subtraction, Multiplication, Division, and Mixed operations
- Exact integer division questions
- Colored console feedback for correct and wrong answers
- Final game statistics
- Play again option
- Organized code using
struct,enum, arrays, loops, and functions
- Functions
- Structs
- Enums
- Arrays
- Loops
- Random Number Generation
- Switch Statements
- Pass by Reference
- Conditional Operator
- Console Programming
- Basic Problem Solving
Math-Game
│
├── Math-Game.cpp
├── README.md
├── LICENSE
├── .gitignore
└── Screenshots
├── Game Start.png
├── Correct Answer.png
├── Wrong Answer.png
├── Final Result - Pass.png
└── Final Result - Fail.png
Compile the source file with a C++ compiler such as GCC/MinGW:
g++ Math-Game.cpp -o Math-GameThen run:
./Math-GameIf you are using Windows with MinGW, the generated executable can be started with:
Math-Game.exeThe colored console output uses Windows
colorandclscommands, so the visual experience is designed primarily for Windows terminals.
C++
This project is licensed under the MIT License. See the LICENSE file for details.
Ahmed Hamdy




