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 22 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
YES! Correct, THANKS for helping me on my review


lkanara2

  • Member
  • Posts: 329
Reply 3 on: Yesterday
Gracias!

 

Did you know?

Stevens-Johnson syndrome and Toxic Epidermal Necrolysis syndrome are life-threatening reactions that can result in death. Complications include permanent blindness, dry-eye syndrome, lung damage, photophobia, asthma, chronic obstructive pulmonary disease, permanent loss of nail beds, scarring of mucous membranes, arthritis, and chronic fatigue syndrome. Many patients' pores scar shut, causing them to retain heat.

Did you know?

Congestive heart failure is a serious disorder that carries a reduced life expectancy. Heart failure is usually a chronic illness, and it may worsen with infection or other physical stressors.

Did you know?

The average person is easily confused by the terms pharmaceutics and pharmacology, thinking they are one and the same. Whereas pharmaceutics is the science of preparing and dispensing drugs (otherwise known as the science of pharmacy), pharmacology is the study of medications.

Did you know?

Aspirin is the most widely used drug in the world. It has even been recognized as such by the Guinness Book of World Records.

Did you know?

Always store hazardous household chemicals in their original containers out of reach of children. These include bleach, paint, strippers and products containing turpentine, garden chemicals, oven cleaners, fondue fuels, nail polish, and nail polish remover.

For a complete list of videos, visit our video library