5. adds value2 to the number of bars sold by child value1
Explanation:
First, the code snippet create a Scanner object called scan.
Then it receive user input as value1. It then also receives another user input as value2.
From the question, we are told that candy[j] is the number of candy bars sold by child j. So, value1 represent number of candy bars by child 1 and value2 represent number of candy bars by child 2.
Therefore;
bars[value1] += value2;
adds value2 to the number of bars sold by child value1
a program execution is called a process
ExplanationIn the process, they process the data and also execute the data.
What happen in process?
First the data came from input, then go to the memory. The process take the data from the memory and process it and divide it, if there's arithmetic data thingy it will go to ALU and the rest to CU. After the data finish being proceed, the data will be sent to CU and executed there, then send back to the memory and go to the output to be shown.#Sorry my grammar sucks
#Moderators please don't be mean, dont delete my answers just to get approval from your senior or just to get the biggest moderation daily rank.