C++ Program to Calculate Volume of Cylinder
Formula: Volume=3.14*Radius*Radius*Height
will be used to Calculate Volume of cylinder in C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include<iostream> using namespace std; int main() { float radius,height,volume; cout<<"Enter Radius of Cylinder : "; cin>>radius; cout<<"Enter Height of Cylinder :"; cin>>height; volume=3.14*radius*radius*height; cout<<"Volume of Cylinder is : " <<volume; return 0; } |
Output: