Wednesday
April 23, 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

Debug=true - The source code that generated this unhandled exception can only be...
Computer Programming - can anyone give me site about programming I need a sample...
Programming logic and design - Design a program that lets the user enter the ...
programming logic - Find Bugs in the pseudocode // A high school is holding a ...
Programming (CSI Programming Logic and Design) - Create a program that outputs a...
Programming (CSI 150 Programming Logic and Design) - Create a program that ...
Computer Programing & Logic Design - Submit pseudocode and a flowchart for the ...
Computer Programing & Logic Design - Submit pseudocode and a flowchart for the ...
Programming - Write a program that would calculate and display the results for ...
Java Programming - I'm a beginner to Java and I need to know how to do the ...

Search
Members