#include <iostream.h> 
const double pi = 3.14159;
// Define the cylinder class:
class cylinder {
  public: double radius, length;
          double volume ( ) {return pi * radius * radius * length;}
};
// Define cylinder array:
cylinder oil_tanks[3];
main ( ) {
  // Wire in sample data:
  oil_tanks[0].radius = 4.7; oil_tanks[0].length = 40.0;
  oil_tanks[1].radius = 3.5; oil_tanks[1].length = 35.5;
  oil_tanks[2].radius = 3.5; oil_tanks[2].length = 45.0;
  // Display volumes:
  cout << "The volumes of the cylinders in the oil-tank array are"
       << endl
       << oil_tanks[0].volume ( ) << ", "
       << oil_tanks[1].volume ( ) << ", and "
       << oil_tanks[2].volume ( ) << endl;
}
