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 39 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
Gracias!


mcabuhat

  • Member
  • Posts: 344
Reply 3 on: Yesterday
Great answer, keep it coming :)

 

Did you know?

Approximately 500,000 babies are born each year in the United States to teenage mothers.

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?

Of the estimated 2 million heroin users in the United States, 600,000–800,000 are considered hardcore addicts. Heroin addiction is considered to be one of the hardest addictions to recover from.

Did you know?

Acetaminophen (Tylenol) in overdose can seriously damage the liver. It should never be taken by people who use alcohol heavily; it can result in severe liver damage and even a condition requiring a liver transplant.

Did you know?

Oxytocin is recommended only for pregnancies that have a medical reason for inducing labor (such as eclampsia) and is not recommended for elective procedures or for making the birthing process more convenient.

For a complete list of videos, visit our video library