/*************************************************/
// paint1.cpp
// R. A. Hillyard
// Last Modified: 08/16/2001
//
// Determine the number of gallons of paint needed for a given area. 
// The user will enter the length and height in feet and inches
/*************************************************/

#include <iostream>

using namespace std;
const float sqFtPerGal = 250.0;

int main()
  {
  float feet;
  float inches;
  float length;
  float height;
  float area;
  float numGallons;

  //get the length from the user	
  cout << "Enter the length in feet and inches" << endl;
  cin >> feet >> inches;

  length = feet + inches/12.0;  //Calculate the total length
  //get the height from the user
  cout << endl << "Enter the height in feet and inches " << endl;
  cin >> feet >> inches;

  height = feet + inches/12.0;  //Calculate the total height
  area = length * height;       //Calculate the area
  numGallons = area/sqFtPerGal; //Calculate how many gallons of paint

  //print results to user
  cout << endl << "You will need: " << numGallons << " gallons of paint to";
  cout << endl << "cover the area of " << area << " square feet" << endl;
	
  return 0;
  }
  
/*****************Program Output********************  
Enter the length in feet and inches
50 6.75

Enter the height in feet and inches
10 6.5

You will need: 2.13205 gallons of paint to
cover the area of 533.013 square feet
****************************************************/