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 42 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 :)


Liamb2179

  • Member
  • Posts: 365
Reply 3 on: Yesterday
Gracias!

 

Did you know?

Side effects from substance abuse include nausea, dehydration, reduced productivitiy, and dependence. Though these effects usually worsen over time, the constant need for the substance often overcomes rational thinking.

Did you know?

Tobacco depletes the body of vitamins A, C, and E, which can result in any of the following: dry hair, dry skin, dry eyes, poor growth, night blindness, abscesses, insomnia, fatigue, reproductive system problems, sinusitis, pneumonia, frequent respiratory problems, skin disorders, weight loss, rickets, osteomalacia, nervousness, muscle spasms, leg cramps, extremity numbness, bone malformations, decayed teeth, difficulty in walking, irritability, restlessness, profuse sweating, increased uric acid (gout), joint damage, damaged red blood cells, destruction of nerves, infertility, miscarriage, and many types of cancer.

Did you know?

All adverse reactions are commonly charted in red ink in the patient's record and usually are noted on the front of the chart. Failure to follow correct documentation procedures may result in malpractice lawsuits.

Did you know?

By definition, when a medication is administered intravenously, its bioavailability is 100%.

Did you know?

Normal urine is sterile. It contains fluids, salts, and waste products. It is free of bacteria, viruses, and fungi.

For a complete list of videos, visit our video library