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 40 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
Thanks for the timely response, appreciate it


kilada

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

 

Did you know?

There can actually be a 25-hour time difference between certain locations in the world. The International Date Line passes between the islands of Samoa and American Samoa. It is not a straight line, but "zig-zags" around various island chains. Therefore, Samoa and nearby islands have one date, while American Samoa and nearby islands are one day behind. Daylight saving time is used in some islands, but not in others—further shifting the hours out of sync with natural time.

Did you know?

During the twentieth century, a variant of the metric system was used in Russia and France in which the base unit of mass was the tonne. Instead of kilograms, this system used millitonnes (mt).

Did you know?

Each year in the United States, there are approximately six million pregnancies. This means that at any one time, about 4% of women in the United States are pregnant.

Did you know?

The FDA recognizes 118 routes of administration.

Did you know?

Amphetamine poisoning can cause intravascular coagulation, circulatory collapse, rhabdomyolysis, ischemic colitis, acute psychosis, hyperthermia, respiratory distress syndrome, and pericarditis.

For a complete list of videos, visit our video library