subject

// 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 until the user enters 9// After headings, output is four lines --// one for each school year classstart Declarations num year num cans num SIZE = 4 num QUIT = 9 num collectedArray[SIZE] = 0, 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 - 1] = collectedArray[year - 1] + cans output "Enter year of student or ", QUIT, " to quit " input year endwhile output HEAD1 output HEAD2 year = 1 while year <= SIZE output year, collectedArray[year - 1] year = year + 1 endwhilestop

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:30, mmimay3501
What do character formats do for your document's message? a. set the tone b. provide organization c. provide clarity d. set how texts align with documents
Answers: 2
image
Computers and Technology, 22.06.2019 16:30, buky0910p6db44
Corey set up his presentation for delivery to his team. the information he had to convey was critical to their job performance. he knew he would need a lot of time to explain each point
Answers: 3
image
Computers and Technology, 22.06.2019 21:30, aesthetickait
How do you take a green screen out of the video while editing?
Answers: 2
image
Computers and Technology, 23.06.2019 01:30, anggar20
Which tab is used to change the theme of a photo album slide show? a. design b. view c. transitions d. home
Answers: 1
You know the right answer?
// A high school is holding a recycling competition// This program allows a user to enter a student'...

Questions in other subjects:

Konu
Social Studies, 15.01.2021 21:40
Konu
English, 15.01.2021 21:40
Konu
Mathematics, 15.01.2021 21:40