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: Please help me with this question on statistics
Q: DO SCHIZOPHRENIA, SPECIFICALY SCHIZOPHRENIFORM
1. Title of Simulation Scenario:• Provide a concise…
Q: Please help me with this statistics question
Q: Please help me with the following statistics questionFor question (e), the options are:Assuming that…
Q: Please help me with the following question on statisticsFor question (e), the drop down options are:…
Q: |
do not copy from another same ques answer,i need differe
nt one.
Task Description:
One of the most…
Q: Problem Statement
A large plate of insulating material 8 cm thick has in it a 3 cm-diam hole, with…
Q: Help me on the following question on statistics
Q: Gravitational Potential Energy
Q: 3. [15] The joint PDF of RVS X and Y is given by
fx.x(x,y) = {
x) = { c(x +
{
c(x+y³),
0,
0≤x≤ 1,0≤…
Q: 7. [10] Suppose that Xi, i = 1,..., 5, are independent normal random variables, where
X1, X2 and X3…
Q: 1. [10] Suppose that X ~N(-2, 4). Let Y = 3X-1.
(a) Find the distribution of Y. Show your work.
(b)…
Q: 6. [10] Let X, Y and Z be random variables. Suppose that E(X) = E(Y) = 1, E(Z) = 2,
V(X) = 1, V(Y) =…
Q: ==
4. [10] Let X be a RV. Suppose that E[X(X-1)] = 3 and E(X) = 2.
(a) Find E[(4-2X)²].
(b) Find…
Q: 2. [15] Let X and Y be two discrete RVs whose joint PMF is given by the following table:
y
Px,y(x,…
Q: Provide an example of a Schizophrenia simulation. Include the following:
· Scenario overview:…
Q: Topic: What does EMG activity look like and how does this change with increasing intensity of muscle…
Q: please sketch a stress-strain diagram for a typical structural steel in tension and display all of…
Q: Does the first heart sound (lubb) occur before or after the QRS complex and explain why this is the…
Q: what makes the first (lubb) and second (dupp) heart sounds?
what does the time interva between the…
Q: Please explain in detail. I am most confused on how to get the transfer functions. thank you