blob: ab75aac6cb6794bf03ef953f35b9201d4a0bf686 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float height;
float radius;
float pi = 3.141592654;
float volume;
cout << "******************************************************************";
cout << "\n This program will tell you the volume of a cylinder \n";
cout << "******************************************************************\n";
cout << "\n\tPlease enter the radius of the cylinder (cm): ";
cin >> radius;
cout << "\n\tPlease enter the height of the cylinder (cm): ";
cin >> height;
volume = pi * radius * radius * height;
cout << "\n\n\tThe volume of this cylinder is: " << volume << " cm^3\n\n\n ";
return 0;
}
|