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 35 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
YES! Correct, THANKS for helping me on my review


carlsona147

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

 

Did you know?

Asthma attacks and symptoms usually get started by specific triggers (such as viruses, allergies, gases, and air particles). You should talk to your doctor about these triggers and find ways to avoid or get rid of them.

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?

Bacteria have flourished on the earth for over three billion years. They were the first life forms on the planet.

Did you know?

A strange skin disease referred to as Morgellons has occurred in the southern United States and in California. Symptoms include slowly healing sores, joint pain, persistent fatigue, and a sensation of things crawling through the skin. Another symptom is strange-looking, threadlike extrusions coming out of the skin.

Did you know?

Common abbreviations that cause medication errors include U (unit), mg (milligram), QD (every day), SC (subcutaneous), TIW (three times per week), D/C (discharge or discontinue), HS (at bedtime or "hours of sleep"), cc (cubic centimeters), and AU (each ear).

For a complete list of videos, visit our video library