C++ examples for Data Type:double
Calculates the volume of a cylinder, given its radius and height
#include <iostream> using namespace std; int main()//from w ww . j a v a 2s. 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; }