Skip to content

C program calculating test percentages with custom rounding and grade feedback

Notifications You must be signed in to change notification settings

BorkedFork/cst120-intro-c-hw2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Test Score Grader

A C console application that calculates test score percentages and provides grade-based feedback.

Description

This program prompts users to enter their actual test score and total points possible, calculates the percentage grade, rounds it to a whole number, and provides humorous feedback based on the grade range.

Features

  • Percentage Calculation: Computes accurate percentage from score and total points
  • Smart Rounding: Implements custom rounding function (3.5→4, 3.49→3)
  • Grade Feedback: Provides commentary based on grade ranges
    • Above 90: "Excellent"
    • 80-89: "Bad"
    • 70-79: "Catastrophe"
    • 60-69: "Death"
    • Below 60: "F"
  • Floating-point Arithmetic: Demonstrates proper float usage in C

Technologies Used

  • C Programming Language
  • Standard I/O (<stdio.h>)
  • Mathematical calculations with floats
  • Visual Studio project structure

Building and Running

Prerequisites

  • C compiler (Visual Studio recommended)
  • Windows operating system

Build Instructions

  1. Open the solution file in Visual Studio
  2. Build the solution (F7 or Build > Build Solution)
  3. Run the executable or press F5

Usage

  1. Run the program
  2. Enter your actual test score
  3. Enter the total points possible
  4. View your percentage grade and feedback

Example Output

Enter your actual test score: 85
Enter total points possible: 100
Your grade: 85%
Bad

Author

Christian Burnett

About

C program calculating test percentages with custom rounding and grade feedback

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages