Wednesday
September 17, 2014

Homework Help: Programming

Posted by Stephen on Sunday, June 16, 2013 at 11:29am.

I need help with debug
Debug06-02
// Program lets user input scores on four tests
// Average is computed and letter grade is determined
// Letter grades are based on 90 for an A, 80 for a B, and so on
start
string name
num score
num NUM_TESTS = 4
num NUM_RANGES = 5
num RANGES[NUM_RANGES] = 90, 80, 70, 60, 0
num QUIT = "ZZZZZ"
string GRADES[NUM_RANGES] = "A", "B", "C", "D", "F"
num total
num average
num sub
output "Enter student name or ", QUIT, " to quit "
input name
while name <> QUIT
sub = 0
while sub < NUM_TESTS
output "Enter score "
input score
total = total + score
endwhile
average = total / NUM_TESTS
sub = 0
while average < RANGES[NUM_TESTS]
sub = sub + 1
endwhile
letterGrade = GRADES[NUM_TESTS]
output name, letterGrade
output "Enter student name or ", QUIT, " to quit "
input name
endwhile
stop

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

programming logic - Find Bugs in the pseudocode // A high school is holding a ...
programming - using pseudocode debug the following 3 programs // A high school ...
programming - 2-5 Grade Determination is says " Write a program that will input ...
programming - Professor Merlin has asked you to help him. He has 5 students who ...
Computer Programing & Logic Design - Submit pseudocode and a flowchart for the ...
c++ - Write a program that asks the user to input a grade that he or she ...
Programming (CSI Programming Logic and Design) - Create a program that outputs a...
Programming (CSI 150 Programming Logic and Design) - Create a program that ...
Information Technology - Develop an algorithm, flow chart and pseudocode that ...
programming - Write a program which allows user to enter 10 student names and ...

Search
Members