1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
steposvetlana [31]
3 years ago
9

#include

Computers and Technology
1 answer:
gavmur [86]3 years ago
4 0

Answer:

See explaination

Explanation:

#include <fstream>

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

// Fill in the code to define payfile as an input file

ifstream payfile;

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

payfile.open("payroll.dat");

// Fill in code to write a conditional statement to check if payfile

// does not exist.

if(!payfile)

{

cout << "Error opening file. \n";

cout << "It may not exist where indicated" << endl;

return 1;

}

ofstream outfile("pay.out");

cout << "Payrate Hours Gross Pay Net Pay"

<< endl << endl;

outfile << "Payrate Hours Gross Pay Net Pay"

<< endl << endl;

// Fill in code to prime the read for the payfile file.

payfile >> hours;

// Fill in code to write a loop condition to run while payfile has more

// data to process.

while(!payfile.eof())

{

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;

outfile << payRate << setw(15) << hours << setw(12) << gross

<< setw(12) << net << endl;

payfile >> hours ;// Fill in the code to finish this with the appropriate

// variable to be input

}

payfile.close();

outfile.close();

return 0;

}

You might be interested in
Who was the father of computer?????​
adell [148]

Answer:

Charles Babbage

Explanation:

4 0
3 years ago
Read 2 more answers
Both IT professionals and governments must apply ethical principles to certify that emerging technologies are to society.
Katarina [22]
The answer is C fair………………………
6 0
2 years ago
What is the best approach to testing a website? visit all pages to verify that they load visit every page and verify all links v
shusha [124]

Answer:

B, visit every page and verify all links

Explanation:

6 0
2 years ago
Authenticating information can be something a user knows, like a password; something a user has, like a smart card; or something
xenn [34]

Answer:. True

Explanation:

yes it is true in my opinion

8 0
2 years ago
Why do we install doorbells in our house
Vinil7 [7]

Explanation:

It's placed near the door. When a visitor presses the button, the bell rings inside alerting you that someone is at the door.

6 0
2 years ago
Read 2 more answers
Other questions:
  • Your motherboard supports dual channeling and you currently have two slots used in channel a on the board; each module holds 1 g
    15·1 answer
  • What kind of testing is basically checking whether a game or feature works as expected by the developers?
    10·1 answer
  • What are the meaning master files<br>​
    8·1 answer
  • A computer lab has two printers. Printer I handles 40% of all the jobs. Its printing time is Exponential with the mean of 2 minu
    8·1 answer
  • What was the major sign that lead Professor Shiller to predict the crash of the housing market​
    6·1 answer
  • Which following is one of the basic characters of object-oriented systems : Select one: a. process b. data c. module d. inherita
    6·1 answer
  • If you play gta and don't know the song ''Glamorous'' Then what do you even do when you play?
    6·2 answers
  • Where is the third vanishing point in the three point perspective
    8·1 answer
  • Why isn't image display working on wacom tablet.
    8·1 answer
  • A web application with an SQL server database is found to be compromised by an attacker. On examination, the email IDs of the da
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!