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 200 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
:D TYSM


amit

  • Member
  • Posts: 364
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

If you could remove all of your skin, it would weigh up to 5 pounds.

Did you know?

The most dangerous mercury compound, dimethyl mercury, is so toxic that even a few microliters spilled on the skin can cause death. Mercury has been shown to accumulate in higher amounts in the following types of fish than other types: swordfish, shark, mackerel, tilefish, crab, and tuna.

Did you know?

Vaccines prevent between 2.5 and 4 million deaths every year.

Did you know?

There are more nerve cells in one human brain than there are stars in the Milky Way.

Did you know?

GI conditions that will keep you out of the U.S. armed services include ulcers, varices, fistulas, esophagitis, gastritis, congenital abnormalities, inflammatory bowel disease, enteritis, colitis, proctitis, duodenal diverticula, malabsorption syndromes, hepatitis, cirrhosis, cysts, abscesses, pancreatitis, polyps, certain hemorrhoids, splenomegaly, hernias, recent abdominal surgery, GI bypass or stomach stapling, and artificial GI openings.

For a complete list of videos, visit our video library