#include <iostream> #include <iomanip> using namespace std; //Function prototype
ID: 3657640 • Letter: #
Question
#include <iostream>
#include <iomanip>
using namespace std;
//Function prototypes
void printDescription();
float computeGrossPay(float, int);
float computeNetPay(float);
int main()
{
float payRate;
float grossPay;
float netPay;
int hours;
cout << setprecision(2) << fixed;
cout << "Welcome to the Pay Roll Program" << endl;
printDescription(); //Call to Description function
cout << "Please input the pay per hour ";
cin >> payRate;
cout << endl << "Please input the number of hours worked ";
cin >> hours;
cout << endl << endl;
grossPay = computeGrossPay(payRate, hours);
// FILL IN THE CODE TO DISPLAY GROSSPAY AND TO CALCULATE NETPAY
// AND DISPLAY NETPAY
cout << "We hope you enjoyed this program" << endl;
return 0;
}
// ********************************************************************
// printDescription
//
// task: This function prints a program description
// data in: none
// data out: none
//
// ********************************************************************
void printDescription() //The function heading
{
cout << endl;
cout << "************************************************" << endl << endl;
cout << "This program takes two numbers (pay rate & hours)" << endl;
cout << "and multiplies them to get gross pay " << endl;
cout << "it then calculates net pay by subtracting 15%" << endl;
cout << "************************************************" << endl << endl;
}
// *********************************************************************
// computeGrossPay
//
// task: This function takes rate and time and multiples them to
// get gross pay.
// data in: pay rate and time in hours worked
// data out: the gross pay
//
// ********************************************************************
float computeGrossPay(float rate, int time)
{
// FILL IN THE CODE TO FIND GROSSPAY
}
// *********************************************************************
// computeNetPay
//
// task: This function takes the gross pay and reduces it by 15%
//
// data in: gross pay
// data out: the net pay
//
// ********************************************************************
float computeNetPay(float gross)
{
// FILL IN THE CODE TO COMPUTE NETPAY
}
Explanation / Answer
#include #include using namespace std; //Function prototypes void printDescription(); float computeGrossPay(float, int); float computeNetPay(float); int main() { float payRate; float grossPay; float netPay; int hours; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.