write a program that will culculate the volume of a cylinder
Answers
Explanation:
include <stdio.h>
int main()
{
int height=38;
int radius=35;
double pie=3.14285714286;
double volume=pie*(radius*radius)*height;
printf("Volume of the cylinder=%f",volume);
More items...
Answer:
Finds the volume of a cylinder
#include<stdio.h>
void main()
{
int radius, height;
float volume=0, pi=3.14;
printf("\nFinds volume of a cylinder\n-------------------");
printf("\nEnter radius: ");
scanf("%d", &radius);
printf("\nEnter height: ");
scanf("%d", &height);
volume = pi*(radius*radius*height);
printf("Volume of a cylinder is: %.2f", volume);
}
Explanation:
output
Finds volume of a cylinder
-------------------
Enter radius: 8
Enter height: 9
Volume of a cylinder is: 1808.64