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 18:30
If an improvement creates no significant change in a product’s performance, then it is a(n) ? a0 design improvement. (there are no answer choices)
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
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