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

Author Question: What is i after the following for loop?int y = 0;for (int i = 0; i<10; ++i) { y += i; } (Read 29 times)

shenderson6

  • Hero Member
  • *****
  • Posts: 573

Question 1

What is the output for y?

int y = 0;
for (int i = 0; i<10; ++i) {
y += i;
}
System.out.println(y);

◦ 12
◦ 13
◦ 45
◦ 11
◦ 10

Question 2

What is i after the following for loop?

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

◦ 10
◦ 11
◦ 9
◦ undefined


Related Topics

Need homework help now?

Ask unlimited questions for free

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

cupcake16

  • Sr. Member
  • ****
  • Posts: 309
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




shenderson6

  • Member
  • Posts: 573
Reply 2 on: May 6, 2020
Wow, this really help


ricroger

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

 

Did you know?

Asthma cases in Americans are about 75% higher today than they were in 1980.

Did you know?

This year, an estimated 1.4 million Americans will have a new or recurrent heart attack.

Did you know?

About 3% of all pregnant women will give birth to twins, which is an increase in rate of nearly 60% since the early 1980s.

Did you know?

Cutaneous mucormycosis is a rare fungal infection that has been fatal in at least 29% of cases, and in as many as 83% of cases, depending on the patient's health prior to infection. It has occurred often after natural disasters such as tornados, and early treatment is essential.

Did you know?

Approximately one in four people diagnosed with diabetes will develop foot problems. Of these, about one-third will require lower extremity amputation.

For a complete list of videos, visit our video library