/* wages2.cpp computes the wages of an employee.
 *
 * Input:   The employee's number, the hours worked, and hourly rate
 * Output:  The employee's number, hours worked, hourly rate, and 
 *          total wages
 ********************************************************************/

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

int main()
{
   cout << "Enter the employee number: ";

   int empNumber;                  // employee number

   cin >> empNumber;

   cout << "Enter the hours worked and the pay rate: ";

   double hours,                   // hours worked by employee
          rate;                    // employee's hourly rate

   cin >> hours >> rate;

   double wages = hours * rate;    // gross wages earned by employee

   cout << "\nEmployee #" << empNumber
        << setprecision(2)         // precision for money values
        << showpoint << fixed      // force fixed point and .00 to display
        << right                   // and right justify
        << "\nHours Worked: " << setw(7) << hours
        << "\nHourly Rate: $" << setw(7) << rate
        << "\nTotal Wages: $" << setw(7) << wages << endl;

   return 0;
}


