subject
Computers and Technology, 25.08.2020 17:01 Geo777

The volume of a cylinder is equal to the height times the area of the circular base. The area of the circular base is equal to π(pi) times the square of the radius. The code segment below is intended to compute and print the volume of a cylinder with radius r and height h. Assume that the double variables r, h, and pi have been properly declared and initialized.

/* missing code */

System. out. print(volume);

Which of the following can be used to replace /* missing code */ so that the code segment works as intended?

I. double baseArea = pi * r * r;double volume = baseArea * h;
II. double volume = pi * r * r;volume = volume * h;
III. double volume = pi * r * r * h;

a. I only
b. III only
c. I and III only
d. II and III only
e. I, II, and III

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:30
My mom and i are moving and we don’t have wifi for the next week, i want to know if using a using a hotspot with unlimited data is better than using regular wifi. i’m considering cost, speed, and data sacrifices.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
How does a policy manual an organization? a. it boost productivity. b. it create awareness in employees about the organization’s values. c. it employees achieve targets. d. it safeguards the organization from liabilities.
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
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
You know the right answer?
The volume of a cylinder is equal to the height times the area of the circular base. The area of the...
Questions
question
Mathematics, 25.03.2021 19:30
question
History, 25.03.2021 19:30
Questions on the website: 13722361