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


kjohnson

  • Member
  • Posts: 330
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

Amoebae are the simplest type of protozoans, and are characterized by a feeding and dividing trophozoite stage that moves by temporary extensions called pseudopodia or false feet.

Did you know?

Bisphosphonates were first developed in the nineteenth century. They were first investigated for use in disorders of bone metabolism in the 1960s. They are now used clinically for the treatment of osteoporosis, Paget's disease, bone metastasis, multiple myeloma, and other conditions that feature bone fragility.

Did you know?

Atropine, along with scopolamine and hyoscyamine, is found in the Datura stramonium plant, which gives hallucinogenic effects and is also known as locoweed.

Did you know?

Although the Roman numeral for the number 4 has always been taught to have been "IV," according to historians, the ancient Romans probably used "IIII" most of the time. This is partially backed up by the fact that early grandfather clocks displayed IIII for the number 4 instead of IV. Early clockmakers apparently thought that the IIII balanced out the VIII (used for the number 8) on the clock face and that it just looked better.

Did you know?

Cancer has been around as long as humankind, but only in the second half of the twentieth century did the number of cancer cases explode.

For a complete list of videos, visit our video library