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

Author Question: Do the following two statements in (I) and (II) result in the same value in sum?(I):for (int i = 0; ... (Read 19 times)

saraeharris

  • Hero Member
  • *****
  • Posts: 546

Question 1

The following loop displays ________.

for (int i = 1; i <= 10; i++) {
System.out.print(i + " ");
i++;
}

◦ 1 3 5 7 9
◦ 1 2 3 4 5 6 7 8 9
◦ 1 2 3 4 5 6 7 8 9 10
◦ 2 4 6 8 10
◦ 1 2 3 4 5

Question 2

Do the following two statements in (I) and (II) result in the same value in sum?

(I):
for (int i = 0; i<10; ++i) {
sum += i;
}

(II):
for (int i = 0; i<10; i++) {
sum += i;
}

◦ Yes
◦ No


Related Topics

Need homework help now?

Ask unlimited questions for free

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

robbielu01

  • Sr. Member
  • ****
  • Posts: 336
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 45% of students answer this correctly




saraeharris

  • Member
  • Posts: 546
Reply 2 on: May 6, 2020
Gracias!


hramirez205

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

 

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?

Vital signs (blood pressure, temperature, pulse rate, respiration rate) should be taken before any drug administration. Patients should be informed not to use tobacco or caffeine at least 30 minutes before their appointment.

Did you know?

The term bacteria was devised in the 19th century by German biologist Ferdinand Cohn. He based it on the Greek word "bakterion" meaning a small rod or staff. Cohn is considered to be the father of modern bacteriology.

Did you know?

Immunoglobulin injections may give short-term protection against, or reduce severity of certain diseases. They help people who have an inherited problem making their own antibodies, or those who are having certain types of cancer treatments.

Did you know?

Adults are resistant to the bacterium that causes Botulism. These bacteria thrive in honey – therefore, honey should never be given to infants since their immune systems are not yet resistant.

For a complete list of videos, visit our video library