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 is built using standard C (C99) and requires a C compiler like GCC or Clang.

1. Extract the downloaded ZIP file.
2. Open your terminal and navigate to the project directory.
3. Compile the source code using GCC:
`gcc -Wall -Wextra -I./include src/*.c -o grade_calculator -lm`
4. Run the compiled executable:
- On Windows: `.\grade_calculator.exe`
- On Mac/Linux: `./grade_calculator`

Project files

    Solution explanation

    - `include/grade_calculator.h`: The main header file containing structs, enums, and function prototypes.
    - `src/grade_calculator.c`: Core logic, math, and status code handling.
    - `src/input.c & src/report.c`: Handles safe string reading and output generation.
    - `src/main.c`: The entry point of the application.