Write a C program to find the volume of a cylinder using any

Write a C++ program to find the volume of a cylinder using any integration method, such as trapezoidal, midpoint, rectangular, Simpson\'s, etc. The radius is 1.234 and height is 5.678. You are not given any other values. Your answer should have four significant figures.

Solution

#include<iostream.h>

#include<conio.h>

#include<iomanip.h>

int main()

{

float radius=1.234,height=5.678,volume;

volume=(22/7)*radius*radius*height;

cout<<setprecision(4)<<\"The Volume is:\"<<volume<<endl;

getch();

return 0;

}

Write a C++ program to find the volume of a cylinder using any integration method, such as trapezoidal, midpoint, rectangular, Simpson\'s, etc. The radius is 1.

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site