subject

Analyze the following code.

double sum = 0;
for (double d = 0; d < 10; sum += sum + d) {
d += 0.1;
}
a. the program has a syntax error because the adjustment statement is incorrect in the for loop.
b. the program has a syntax error because the control variable in the for loop cannot be of the double type.
c. the program compiles but does not stop because d would always be less than 10.
d. the program compiles and runs fine.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:20
Q-1 which of the following can exist as cloud-based it resources? a. physical serverb. virtual serverc. software programd. network device
Answers: 3
question
Computers and Technology, 23.06.2019 03:50
Q-1 which of the following can exist as cloud-based it resources? a. physical serverb. virtual serverc. software programd. network device
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
You know the right answer?
Analyze the following code.

double sum = 0;
for (double d = 0; d < 10; sum...
Questions
question
Mathematics, 06.05.2020 21:25
question
Mathematics, 06.05.2020 21:25
Questions on the website: 13722359