subject
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

ansver
Answers: 1

Other questions on the subject: Advanced Placement (AP)

image
Advanced Placement (AP), 23.06.2019 03:30, schoolwannapass
Read the statements and determine the correct answer for each blank. microorganisms that cause diseases are known as . they thrive best between the temperatures of °f °f. because are usually around 70°f, it the growth of spoilage-causing bacteria. a)
Answers: 2
image
Advanced Placement (AP), 25.06.2019 09:00, BardiFan
4. when a child cries out during rough play, the caregiver should a. encourage the distressed child to fight back. b. respond immediately, since the behavior has changed to fighting. c. ignore it, because rough play is a natural part of children’s learning. d. ignore the request for unless there has been an injury. i need answer
Answers: 1
image
Advanced Placement (AP), 25.06.2019 22:30, cancerbaby209
The larger the investment you make, the easier it will be to: get money from other sources. guarantee cash flow. buy insurance. streamline your products.
Answers: 1
image
Advanced Placement (AP), 26.06.2019 14:40, kristineford198
Will give ! need latin ! translate the following sentences ! bellum ab romanis in (against) graecos gestum est puellae ab nautus graecos pugnare gladiis doctae sunt dona magna ab pueris pulchris puellis parvis data erunt maga regni ab regina mala amatur ( dont use translators)
Answers: 1
You know the right answer?
Consider the following code segment, which is intended to store the sum of all multiples of 10 betwe...

Questions in other subjects:

Konu
Mathematics, 05.03.2021 19:40
Konu
Mathematics, 05.03.2021 19:40
Konu
Mathematics, 05.03.2021 19:40
Konu
Health, 05.03.2021 19:40