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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:20, sindy35111
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, thezbell
What is estimated time of arrival (eta)? a device that measures the acceleration (the rate of change of velocity) of an item and is used to track truck speeds or taxi cab speeds a gps technology adventure game that posts the longitude and latitude location for an item on the internet for users to find a north/south measurement of position the time of day of an expected arrival at a certain destination and is typically used for navigation applications
Answers: 3
image
Computers and Technology, 23.06.2019 17:30, kenyasutton10
What are the most commonly found items in the trash according to the municipal solid waste report?
Answers: 1
image
Computers and Technology, 23.06.2019 21:00, kkpsmith
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
You know the right answer?
Analyze the following code.

double sum = 0;
for (double d = 0; d < 10; sum...

Questions in other subjects:

Konu
History, 20.05.2021 23:10