C++ double type Calculates cylinder's volume from its radius and height

Description

C++ double type Calculates cylinder's volume from its radius and height

#include <iostream>
using namespace std;
int main()/*from w w  w.j  av  a2  s. c o m*/
{
   double radius, height, volume;
   radius = 2.5;
   height = 16.0;
   volume = 3.1416 * radius * radius * height;
   cout << "The volume of the cylinder is " << volume << endl;
   return 0;
}



PreviousNext

Related