Skip to main content

ProwessApps

Learn · Practice · Excel

C++ implementation

Student Grade Calculator in C++

Build a console application that calculates totals, averages, grades, and pass or fail results.

Setup instructions

This project uses modern C++ (C++17/20) features and requires a compatible compiler (GCC, Clang, or MSVC).

1. Extract the downloaded ZIP file.
2. Open your terminal and navigate to the project root.
3. Compile the code using a modern standard:
`g++ -std=c++17 -Wall -Wextra -I./include src/*.cpp -o grade_calculator`
4. Run the executable:
- On Windows: `.\grade_calculator.exe`
- On Mac/Linux: `./grade_calculator`

Project files

    Solution explanation

    - `include/grade_calculator/models.hpp`: Modern C++ structs, `enum class`, and constants.
    - `src/grade_calculator.cpp`: Core logic utilizing `<algorithm>` and `<numeric>` standard libraries.
    - `src/console_input.cpp`: Robust input validation and stream handling.
    - `src/main.cpp`: The application entry point.