CH 6: Debug Files A high school is holding a recycling competition, and this program allows a user to enter a student's year in school (1 through 4) and number of cans collected for recycling. Data is entered continuously until the user enters 9 for the year. After headings, output is four lines -- one for each school year class. start Declarations num year num cans num SIZE=4 num QUIT=9 num collectedArray[SIZE] = 0, 0, 0 string HEAD1 = "Can Recycling Report" string HEAD2= "Year Cans Collected" output "Enter year of student or ", QUIT, " to quit" input year while year <> QUIT output "Enter number of cans collected" input cans collectedArray[year] = collectedArray[year] + cans output "Enter year of student or ", QUIT, " to quit" input year endwhile output HEAD1 output HEAD2 year = 1 while year SIZE year = year + 1 endwhile stop
CH 6: Debug Files A high school is holding a recycling competition, and this program allows a user to enter a student's year in school (1 through 4) and number of cans collected for recycling. Data is entered continuously until the user enters 9 for the year. After headings, output is four lines -- one for each school year class. start Declarations num year num cans num SIZE=4 num QUIT=9 num collectedArray[SIZE] = 0, 0, 0 string HEAD1 = "Can Recycling Report" string HEAD2= "Year Cans Collected" output "Enter year of student or ", QUIT, " to quit" input year while year <> QUIT output "Enter number of cans collected" input cans collectedArray[year] = collectedArray[year] + cans output "Enter year of student or ", QUIT, " to quit" input year endwhile output HEAD1 output HEAD2 year = 1 while year SIZE year = year + 1 endwhile stop
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
![CH 6: Debug Files
A high school is holding a recycling competition, and this program allows a user to enter a
student's year in school (1 through 4) and number of cans collected for recycling. Data is entered
continuously until the user enters 9 for the year. After headings, output is four lines -- one for
each school year class.
start
Declarations
num year
num cans
num SIZE=4
num QUIT = 9
num collectedArray[SIZE] = 0, 0, 0
string HEAD1 = "Can Recycling Report"
string HEAD2 = "Year Cans Collected"
output "Enter year of student or ", QUIT, " to quit "
input year
while year <> QUIT
output "Enter number of cans collected"
input cans
collectedArray[year] = collectedArray[year] + cans
output "Enter year of student or ", QUIT, " to quit "
input year
endwhile
output HEAD1
output HEAD2
year = 1
while year < SIZE
year = year + 1
endwhile
stop](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7ae6cd5f-471f-486e-ae00-acb88ba7619b%2F38ccb9fa-f2c5-4cbf-8930-9d284e6a7857%2Fx6gcva4_processed.png&w=3840&q=75)
Transcribed Image Text:CH 6: Debug Files
A high school is holding a recycling competition, and this program allows a user to enter a
student's year in school (1 through 4) and number of cans collected for recycling. Data is entered
continuously until the user enters 9 for the year. After headings, output is four lines -- one for
each school year class.
start
Declarations
num year
num cans
num SIZE=4
num QUIT = 9
num collectedArray[SIZE] = 0, 0, 0
string HEAD1 = "Can Recycling Report"
string HEAD2 = "Year Cans Collected"
output "Enter year of student or ", QUIT, " to quit "
input year
while year <> QUIT
output "Enter number of cans collected"
input cans
collectedArray[year] = collectedArray[year] + cans
output "Enter year of student or ", QUIT, " to quit "
input year
endwhile
output HEAD1
output HEAD2
year = 1
while year < SIZE
year = year + 1
endwhile
stop
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education
Expert Answers to Latest Homework Questions
Q: Calculate total assets: Total Liabilities $400,000, Owner's Equity $600,000.hel
Q: Break-even analysis: Fixed Costs $50,000, Variable Costs $10/unit, Selling Price $20/unit.
help??
Q: You borrow $200,000 to buy a house at an annual interest rate of 4%. If you repay the loan over 30…
Q: Please help me solve this general accounting problem with the correct financial process.
Q: Do not use A.I and solve completely
Q: Calculate accounts receivable turnover: Net Credit Sales $500,000, Average Accounts Receivable…
Q: You invest $5,000 in a mutual fund that charges a 1.5% management fee and a 0.5% administrative fee.…
Q: You borrow $200,000 to buy a house at an annual interest rate of 4%. If you repay the loan over 30…
Q: The graph shows Alex's distance from home after biking for x hours. What is the average rate of…
Q: Inventory turnover ratio: Cost of Goods Sold $300,000, Average Inventory $60,000.
Q: A project requires an initial investment of $100,000 and generates annual cash flows of $20,000 for…
Q: Calculate owner's equity: Assets $1,000,000, Liabilities $400,000.
help..??
Q: I need help solving this financial accounting question with the proper methodology.
Q: You invest $5,000 in a mutual fund that charges a 1.5% management fee and a 0.5% administrative fee.…
Q: What is the accounting equation?
need a helfu
Q: No ai
You invest $5,000 in a mutual fund that charges a 1.5% management fee and a 0.5%…
Q: Calculate net income for a company with revenues $100,000 and expenses $80,000.
Q: You are the newly appointed CEO of TechSouth, a South African multinational technology company based…
Q: If a company's assets increase by $50,000 and liabilities decrease by $20,000, what is the change in…
Q: no ai..??
If a stock is priced at $50 and increases by 10%, what's its new price?
Q: The required return on a stock is 10%, the stock's beta is 1.2, and the risk-free rate is 3%. Using…