subject

#include
#include
#include
using namespace std;

int main()
{
// Fill in the code to define payfile as an input file

float gross;
float net;
float hours;
float payRate;
float stateTax;
float fedTax;

cout << fixed << setprecision(2) << showpoint;
// Fill in the code to open payfile and attach it to the physical file
// named payroll. dat

// Fill in code to write a conditional statement to check if payfile
// does not exist.
{
cout << "Error opening file. \n";
cout << "It may not exist where indicated" << endl;
return 1;
}
cout << "Payrate Hours Gross Pay Net Pay"
<< endl << endl;
// Fill in code to prime the read for the payfile file.

// Fill in code to write a loop condition to run while payfile has more
// data to process.
{
payfile >> payRate >> stateTax >> fedTax;
gross = payRate * hours;
net = gross - (gross * stateTax) - (gross * fedTax);
cout << payRate << setw(15) << hours << setw(12) << gross
<< setw(12) << net << endl;
payfile >> // Fill in the code to finish this with the appropriate
// variable to be input
}
payfile. close();
return 0;
}

Required:
Assume that the data file has hours, payRate, stateTax, and fedTax on one line for each employee. stateTax and fedTax are given as decimals (5% would be 0.05). Complete this program by filling in the code (places in bold).

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:50
Match the personality traits with their description
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Which type of file can be used to import data into a spreadsheet?
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
You know the right answer?
#include
#include
#include
using namespace std;

int main()
{<...
Questions
question
Mathematics, 25.08.2019 14:30
question
Health, 25.08.2019 14:30
question
Biology, 25.08.2019 14:30
question
Mathematics, 25.08.2019 14:30
question
Mathematics, 25.08.2019 14:30