Thanks Daved. Everything seems to be working fine now. Take a look... I'm gettin kinda proud that it didn't take me hours and hours to figure out this program! hehe
Code:
#include <iostream>
#include <iomanip>
using namespace std;
void getData(double&, double&);
double computePay(double&, double&);
void displayNet(double, double);
int main()
{
double hours = 0;
double rate = 0;
double netPay = 0;
cout << fixed << showpoint << setprecision(2);
getData(rate, hours);
computePay(rate, hours);
displayNet(rate, hours);
return 0;
}
void getData(double& rate, double& hours)
{
cout << "Enter rate of pay: ";
cin >> rate;
cout << endl;
cout << "Enter hours: ";
cin >> hours;
cout << endl;
}
double computePay(double& rate, double& hours)
{
double netPay = rate * hours;
return netPay;
}
void displayNet(double rate, double hours)
{
cout << "Net pay: $" << computePay(rate, hours) << endl;
}