answersLogoWhite

0


Best Answer

#include

#include

#define pi=3.141593

void main()

{

float r,h,a;

clrscr();

printf("Enter the radius:\t");

scanf("%f",&r);

printf("\nEnter the hight:\t");

scanf("%f",&h);

a=pi*r*r*h;

printf("\n The area of cylinder is: %f",a);

getch();

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

#include<math.h> // for atan() function

long double volume_of_cylinder (long double, long double);

long double area_of_circle (long double);

long double volume_of_cylinder (long double radius, long double height) {

return area_of_circle (radius) * height;

}

long double area_of_circle (long double radius) {

const long double pi = atan(1) * 4;

return pi * radius * radius;

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a C program to find the volume of a cylinder?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a c program to find Volume and surface area of cube?

Write a c program to compute the surface area and volume of a cube


Can you use a graduated cylinder to find the volume of keys?

Yes. Fill the cylinder with a specific amount of water and write that amount down. (Any amount, as long as the keys will fit in without the water overflowing, and there is enough to make a difference.) Then put the keys in. Write down the new volume displayed by the graduated cylinder. Subtract the first volume form the initial volume, (this is change in volume), and you will get the volume of the keys.


How can i find the volume of the cylinder?

Volume of cylinder: base squared times length


Find the volume ofFind the volume of the cylinder. the cylinder?

v=l*b


How do you find cylinder's volume?

Volume of a cylinder = pi*radius2*height in cubic units


How do you find volume of cylinder when base and height is given?

Volume of a cylinder in cubic units = piradius2height


What is the formula to find the volume for cylinder by using diameter?

The diameter, alone, is not enough to find the volume of a cylinder. You need the height as well. &gt; Where pi = 3.1416, and d = cylinder diameter cylinder volume = pi * (d/2)2 * length of cylinder


How you find the volume of a cylinder?

you listen to it


What is the density of a cylinder?

Density = Mass/Volume, correct. However, with a cylinder, you have to find the volume. In order to find the volume of a cylinder use the equation PiR2 * H where "R" is the radius (Diameter/2) squared.


How do you find Volume for a cylinder?

Volume of a cylinder = pi*(radius)2*(height) where pi = 22/7


How do you Find out the volume of a cylinder?

First find the area of the cylinder's base, and multiply that by the height. For V = A x h. Volume, Area, height.


What instrument is used to to find volume?

Graduated cylinder