This topic contains a solution. Click here to go to the answer

Author Question: For the questions below, assume an int array, candy, stores the number of candy bars sold by a group ... (Read 151 times)

fox

  • Hero Member
  • *****
  • Posts: 540
For the questions below, 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?
◦ for (int j=0; j<12; j++) sum += candy[j];
◦ for (int j=0; j<12; j++) candy[j] = sum;
◦ for (int j=0; j<12; j++) sum = candy[j];
◦ for (int j=0; j<12; j++) sum += [j];
◦ for (int j=0; j<12; j++) [j] += sum;


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by fox on Aug 30, 2020

ttt030911

  • Sr. Member
  • ****
  • Posts: 315
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 49% of students answer this correctly




fox

  • Member
  • Posts: 540
Reply 2 on: Aug 30, 2020
Gracias!


ryhom

  • Member
  • Posts: 366
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

About one in five American adults and teenagers have had a genital herpes infection—and most of them don't know it. People with genital herpes have at least twice the risk of becoming infected with HIV if exposed to it than those people who do not have genital herpes.

Did you know?

Bisphosphonates were first developed in the nineteenth century. They were first investigated for use in disorders of bone metabolism in the 1960s. They are now used clinically for the treatment of osteoporosis, Paget's disease, bone metastasis, multiple myeloma, and other conditions that feature bone fragility.

Did you know?

The use of salicylates dates back 2,500 years to Hippocrates's recommendation of willow bark (from which a salicylate is derived) as an aid to the pains of childbirth. However, overdosage of salicylates can harm body fluids, electrolytes, the CNS, the GI tract, the ears, the lungs, the blood, the liver, and the kidneys and cause coma or death.

Did you know?

The eye muscles are the most active muscles in the whole body. The external muscles that move the eyes are the strongest muscles in the human body for the job they have to do. They are 100 times more powerful than they need to be.

Did you know?

Limit intake of red meat and dairy products made with whole milk. Choose skim milk, low-fat or fat-free dairy products. Limit fried food. Use healthy oils when cooking.

For a complete list of videos, visit our video library