Tuesday
September 16, 2014

Homework Help: programming

Posted by Andre on Friday, August 30, 2013 at 8:42pm.

Find Bugs in the pseudocode


start
Declarations
num category
num SIZE = 5
num QUIT = 9
num sales[SIZE] = 0, 0, 0, 0, 0
string HEAD1 = "Sales"
string HEAD2 = "Category Number of Sales"
output "Enter category ", QUIT, " to quit "
input category
while category = QUIT
if category >= 1 AND category < SIZE then
sales[category + 1] = sales[category - 1] + 1
else
output "Invalid category"
endif
output "Enter category ", QUIT, " to quit "
input category
endif
output HEAD1
output HEAD2
category = 0
while category <= SIZE
output category + 1, sales[category]
category = category + 1
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 - I need help with debug Debug06-02 // Program lets user input ...
programming - where are the errors the pseudocode debugging exercise // This ...
c++ program - will this work for a source code that receive and total collection...
C programming - Question: Write a program that reads integers from the keyboard ...
math - The sum of the digits of a 2 digit num is 15 then the num obtained by ...
C++ - Write a statement that passes the value 4 to the function below and assign...
Programming Logic - I need to create a program that has (at least) two variables...
Programming Logic - I need to create a program that has (at least) two variables...

Search
Members