/* revenue6.cpp computes revenues for a cable installer.
 *
 * Input:  Number of installations, yards of cable installed
 * Output: The total revenue resulting from these installations
 **************************************************************/

#include <iostream.h>                  // cin, cout, <<, >>, fixed, 
showpoint
#include <iomanip.h>                   // setprecision()

int main()
{
  const double INSTALL_CHARGE = 30.00;
  const double CABLE_COST_PER_FOOT = 2.00;

  cout << "Enter the number of installations\n"
       << "followed by the total yards of cable installed: ";
  int installations;
  double yardsOfCable;
  cin >> installations >> yardsOfCable;


  double installRevenue = INSTALL_CHARGE * installations;
  double feetOfCable = 3.0 * yardsOfCable;
  double cableRevenue = CABLE_COST_PER_FOOT * feetOfCable;
  double totalRevenue = installRevenue + cableRevenue;

  cout << "\nThe total revenue for these installations is $"
       << fixed << showpoint      // use fixed-point form, show decimal 
point,
       << setprecision(2)         // and 2 decimal places
       << totalRevenue << endl;

  return 0;
}


