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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, Wolfie215
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
image
Computers and Technology, 23.06.2019 15:30, jasssp
Write a program in plp assembly that counts up by one starting from zero (or one) inside a loop and writes this value to the leds every time the value is increased. the memory address of the leds is 0xf0200000. the table below shows the meaning and an example usage of the instructions covered in the video, plp instructions for project 1. instruction example usage meaning load immediate li $t0, 8 register $t0 is set to the value, 8. store word sw $t2, 0($t1) the value in register $t1 is used as the memory address. the value in register $t2 is copied into this memory address. add addiu $t4, $t3, 29 register $t4 is assigned the sum of 29 and the value in register $t3. jump j your_label_name the program jumps to the line following the label, "your_label_name: ". label your label name: defines a label called "your_label_name: " that can be jumped to
Answers: 2
image
Computers and Technology, 24.06.2019 02:00, sameh0425
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
image
Computers and Technology, 25.06.2019 08:20, chloesmolinski0909
In the following table, column a is column b is and column c is
Answers: 1
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 in other subjects:

Konu
Mathematics, 30.07.2019 18:30
Konu
History, 30.07.2019 18:30
Konu
Mathematics, 30.07.2019 18:30