1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Andru [333]
3 years ago
11

Write a function ""volCylinder"" that takes twofloats""r""for the radius and ""h""for the height of the cylinder and returnsthe

volumeof the cylinder. You can check the Wikipedia page to learn about volume calculation of the cylinders:
Computers and Technology
2 answers:
shutvik [7]3 years ago
8 0

Answer:

   public static double volCylinder(double r, double h){

       double volCylinder = Math.PI*(r*r)*h;

       return volCylinder;

   }

Explanation:

Using Java programming language

The function (method) is declared to accept two double parameters for radius and height

Using the formula Vol = \pi r^{2} h The volume is calculated and returned.

See a complete java code with a main method below

<em>public class num7 {</em>

<em>    public static double volCylinder(double r, double h){</em>

<em>        double volCylinder = Math.PI*(r*r)*h;</em>

<em>        return volCylinder;</em>

<em />

<em>    }</em>

<em>    public static void main(String[] args) {</em>

<em>    double radius =5.1;</em>

<em>    double height = 7.1;</em>

<em>        System.out.println("The volume of the cylinder is: "+volCylinder(radius,height));</em>

<em>    }</em>

<em>}</em>

Mandarinka [93]3 years ago
4 0

Answer:

def volCylinder(r, h):

   return 3.14 * r * r * h;    

radius = float(input("Enter the radius: "))

height = float(input("Enter the height: "))

print("The volume of the cylinder is: "+ str(volCylinder(radius, height)))

Explanation:

- Inside the function, calculate the volume of the cylinder using the formula and return the result.

- Then, take inputs from the user for radius and height as float numbers

- Call the function and print the result

You might be interested in
Circuit continuity is checked using the___ function of a multimeter
Phantasy [73]
I usually use the Ohm meter to check for resistance. If the circuit completes, the measurement is negligible.
5 0
3 years ago
A ____ web site is a fraudulent site that has been set up to be indistinguishable from the legitimate site it is pretending to b
Vladimir [108]
Your answer is spoofed.
Thx and take care
7 0
3 years ago
Sends a copy of the message and any additional comments to a different e-mail address
Debora [2.8K]

Answer:

Forward.

Explanation:

E-mail is an acronym for electronic mail and it can be defined as a set of written words, texts, characters used for conveying a message from one person to another. It is a channel or medium of communication between one person and the other.

Forward simply sends a copy of the message and any additional comments to a different e-mail address. The term forward is used in email to describe the process of sending a message.

3 0
4 years ago
Research and describe surround sound. What are the different types of surround sound? How is it used? How might surround sound a
Reptile [31]

Surround sound was first application was in movie theaters. Prior to surround sound, theater sound systems commonly had three "screen channels" of sound, from loudspeakers located in front of the audience at the left, center, and right. Surround sound adds one or more channels from loudspeakers behind the listener, able to create the sensation of sound coming from any horizontal direction 360° around the listener. Surround sound formats vary in reproduction and recording methods along with the number and positioning of additional channels.  Multichannel audio techniques may be used to reproduce contents as varied as music, speech, natural or synthetic sounds for cinema, television, broadcasting, or computers.

5 0
3 years ago
What was true of Northern cities?
lara [203]

Answer:

D. Segregation was practiced even where it was not the law.

Explanation:

7 0
4 years ago
Other questions:
  • Look at the code in the example below, and then answer the question. In the example code, what does the title attribute create?
    12·2 answers
  • A senior center would like to add a new computer to their library so that members can check their email and read book reviews
    11·2 answers
  • A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that
    11·2 answers
  • The piston ring isn't a completely solid ring; instead, it's usually split at one point. This split or gap in the ring is called
    7·2 answers
  • A user prefers an external monitor, mouse, and keyboard for a laptop. The user does not want to use the built-in screen; however
    5·1 answer
  • URGENT!!! If Pete selects the green square or little green camera icon on his camera dial, what mode is he selecting?
    15·1 answer
  • A tiny spot on an LCD monitor display screen that permanently remains black when it should be activated and displaying color is
    12·1 answer
  • Write a for loop to print the numbers from 20 to 30, inclusive (this means it should include both the 20 and 30). The output sho
    5·1 answer
  • output device. Vrite very short answer of the following questions. What is computer hardware? Which dovico in lini nwhich device
    15·1 answer
  • Explain how information in an access log could be used to identify the true identity of an impostor who has acquired unauthorize
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!