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

Author Question: What balance after the following code is executed?int balance = 10;while (balance >= 1) { if ... (Read 61 times)

Pineappleeh

  • Hero Member
  • *****
  • Posts: 585

Question 1

What is y after the following for loop statement is executed?

int y = 0;
for (int i = 0; i < 10; ++i) {
y += 1;
}

◦ 9
◦ 11
◦ 12
◦ 10

Question 2

What balance after the following code is executed?

int balance = 10;

while (balance >= 1) {
if (balance < 9) continue;
balance = balance - 9;
}

◦ -1
◦ 0
◦ 1
◦ 2
◦ The loop does not end


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by Pineappleeh on May 6, 2020

anyusername12131

  • Sr. Member
  • ****
  • Posts: 327
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 39% of students answer this correctly




Pineappleeh

  • Member
  • Posts: 585
Reply 2 on: May 6, 2020
Great answer, keep it coming :)


frankwu0507

  • Member
  • Posts: 322
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

According to the CDC, approximately 31.7% of the U.S. population has high low-density lipoprotein (LDL) or "bad cholesterol" levels.

Did you know?

The shortest mature adult human of whom there is independent evidence was Gul Mohammed in India. In 1990, he was measured in New Delhi and stood 22.5 inches tall.

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?

In the United States, congenital cytomegalovirus causes one child to become disabled almost every hour. CMV is the leading preventable viral cause of development disability in newborns. These disabilities include hearing or vision loss, and cerebral palsy.

Did you know?

About 80% of major fungal systemic infections are due to Candida albicans. Another form, Candida peritonitis, occurs most often in postoperative patients. A rare disease, Candida meningitis, may follow leukemia, kidney transplant, other immunosuppressed factors, or when suffering from Candida septicemia.

For a complete list of videos, visit our video library