Computers and Technology
Computers and Technology, 21.04.2020 02:32, lainnn974

Assume an int array, candy, stores the number of candy bars sold by a group of children where candy[j] is the number of candy bars sold by child j. Assume there are 12 children in all ,which of the following code could be used to compute the total number of bars sold by the children?

Scanner scan = Scanner. create(System. in); int value1 = scan. nextInt( ); int value2 = scan. nextInt( ); bars[value1] += value2;

1. adds value1 to the number of bars sold by child value2
2. adds 1 to the number of bars sold by child value1 and child value2
3. adds 1 to the number of bars sold by child value1
4. inputs a new value for the number of bars sold by both child value1 and child value2
5. adds value2 to the number of bars sold by child value1

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 04:31, legendman27
Jennifer has to set up a network in a factory with an environment that has a lot of electrical interference. which cable would she prefer to use? jennifer would prefer to use because its metal sheath reduces interference.
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, austintules2005
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
image
Computers and Technology, 23.06.2019 11:00, jolleyrancher78
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, xojade
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
Do you know the correct answer?
Assume an int array, candy, stores the number of candy bars sold by a group of children where candy[...

Questions in other subjects:

Konu
Mathematics, 03.12.2020 19:50
Konu
Mathematics, 03.12.2020 19:50