# computer

// This program counts how many sales are made
// in each of five categories of products
start
Declarations
num category
num SIZE = 5
num QUIT = 9
num sales[SIZE] = 0, 0, 0, 0, 0
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
endwhile
while category < SIZE
output category + 1, sales[category]
category = category + 1
endwhile
stop

This homework is a Find the Bug with Array logic. (There are about 4 errors)

1. 👍 0
2. 👎 0
3. 👁 195

## Similar Questions

1. ### C Programming

how do i write a C program that accepts sales made by 5 sales reps for the 4 months that they have been selling the company's products. The program should then find the total sales for 4 months, total sales for each sales rep, and

asked by Anonymous on September 9, 2014
2. ### statistics

a company decides to add a new program that prepares randomly selected sales personnel to increase their number of sales per month. The mean number of sales per month for the overall popualtion of sales people at this national

asked by Anonymous on May 20, 2013
3. ### Statistics

1. A company decides to add a new program that prepares randomly selected sales personnel to increase their number of sales per month. The mean number of sales per month for the overall population of sales people at this national

asked by daniel on February 19, 2014
4. ### Psychology

1. A company decides to add a new program that prepares randomly selected sales personnel to increase their number of sales per month. The mean number of sales per month for the overall population of sales people at this national

asked by Sandy on October 5, 2013
5. ### C Programming

Write a C program that accepts sales made by 5 sales reps for the 4 months that they have been selling the company's products. The program should then find the total sales for 4 months, total sales for each sales rep, and total

asked by Blessing on September 9, 2014
1. ### finance

A company wants to invest in a new advertising program. Using the NPV method of capital budgeting, determine the proposal’s appropriateness and economic viability with the following information: • The new program will increase

asked by liza on November 18, 2010
2. ### statistics

1. A company decides to add a new program that prepares randomly selected sales personnel to increase their number of sales per month. The mean number of sales per month for the overall population of sales people at this national

asked by Anonymous on March 10, 2014
3. ### programming

using pseudocode debug the following 3 programs // A high school is holding a recycling competition // This program allows a user to enter a student's // year in school (1 through 4) // and number of cans collected // Data is

asked by dan on January 13, 2014
4. ### programming logic

Find Bugs in the pseudocode // A high school is holding a recycling competition // This program allows a user to enter a student's // year in school (1 through 4) // and number of cans collected // Data is entered continuously

asked by tina on April 15, 2012
5. ### Computer Science

Design a program that will ask the user to enter the amount of a purchase. The program should the compute the state and county sales tax. Assume the state sales tax is 4 percent and the county sales tax is 2 percent. The program

asked by AB on May 17, 2012

More Similar Questions