Grade Calculator

Author: Jordan Kidney ( kidney@cpsc.ucalgary.ca )   Date: Feb 14, 2006

Concepts to be applied for the problem:

  1. Program documentation
  2. Formulas / calculations
  3. Decision making / conditional statements


What the program should do: This program will calculate the percentage and letter grade achieved by a student on a test. The user should be asked to enter the mark they got on the test and the highest possible mark that can be achieved for the test. Given this, the program must then calculate the percentage value the student got on the test and output this information to the user. Next the program will determine the letter grade achieved by the student. This can be done by comparing the percentage value against the following table for conversion to a letter grade:

RangeLetter Grade
90% or aboveA
85% to 89%A-
80% to 84%B+
75% to 79%B
70% to 74%B-
65% to 69%C+
60% to 64%C
55% to 59%C-
50% to 54%D+
45% to 49%D
40% to 44%D-
0% to 39%F

For example if the student got a mark of 34 out of 50 total marks then the output could be something as shown below:

You got 68% on the test which gives you a letter grade of C+