Advanced Placement (AP)
Advanced Placement (AP), 25.03.2020 05:46, Ladyt916

Consider the following code segment, which is intended to store the sum of all multiples of 10 between 10 and 100, inclusive (10 + 20 + ... + 100), in the variable total.

int x = 100;

int total = 0;

while( /* missing code */ )

{

total = total + x;

x = x - 10;

}

Which of the following can be used as a replacement for /* missing code */ so that the code segment works as intended?

A. x < 100

B. x <= 100

C. x > 10

D. x >= 10

E. x != 10

answer
Answers: 1

Other questions on the subject: Advanced Placement (AP)

image
Advanced Placement (AP), 22.06.2019 07:30, ghari112345
Which of the following is minced by very thin slicing? a) carrots b) chives c) endive d)garlic
Answers: 2
image
Advanced Placement (AP), 23.06.2019 12:00, ineedtopeebeforethec
Activity 1.3.2 standard and metric measuring pltw
Answers: 1
image
Advanced Placement (AP), 25.06.2019 00:00, Aleah6645
Which is a type of tectonic plate boundary?
Answers: 2
image
Advanced Placement (AP), 25.06.2019 06:30, dozsyerra
In florida, refusal the submit to testing (first offense) results in a) license revocation b)a 30 day suspension c) a 6 month suspension d) a 12 month suspension
Answers: 1
Do you know the correct answer?
Consider the following code segment, which is intended to store the sum of all multiples of 10 betwe...

Questions in other subjects:

Konu
English, 24.11.2020 21:20
Konu
Mathematics, 24.11.2020 21:20
Konu
Chemistry, 24.11.2020 21:20