// rectPizza.m   Compute price per square inch of a pizza
// P. Conrad CISC106 Fall 2006

#include <iostream>
#include <cmath>  // for fabs
#include <iomanip> // for setprecision()

using namespace std;

const double tolerance = 0.001;

// function prototypes

double areaOfRect(double length, double width);

// main program

int main()
{

  double length;
  cout << "Please enter length of pizza (in inches): ";
  cin >> length;

  double width;
  cout << "Please enter width of pizza (in inches): ";
  cin >> width;
	
  double price;
  cout << "Please enter price of pizza (in dollars): ";
  cin >> price;

  double pricePerSquareInch = price/areaOfRect(length,width);

  cout << "Price in dollars per square inch is " 
       << setprecision(2) << pricePerSquareInch << endl;

  return 0;
}
