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 30 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


amcvicar

  • Member
  • Posts: 341
Reply 3 on: Yesterday
Excellent

 

Did you know?

Urine turns bright yellow if larger than normal amounts of certain substances are consumed; one of these substances is asparagus.

Did you know?

You should not take more than 1,000 mg of vitamin E per day. Doses above this amount increase the risk of bleeding problems that can lead to a stroke.

Did you know?

There are more bacteria in your mouth than there are people in the world.

Did you know?

The Romans did not use numerals to indicate fractions but instead used words to indicate parts of a whole.

Did you know?

There are immediate benefits of chiropractic adjustments that are visible via magnetic resonance imaging (MRI). It shows that spinal manipulation therapy is effective in decreasing pain and increasing the gaps between the vertebrae, reducing pressure that leads to pain.

For a complete list of videos, visit our video library