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
What was one important academic skill the blogger learned?
denis23 [38]

An academic skill that the blogger learned, was to review the graded tests and quizzes to see which concepts he missed out on so that in the future he would be well prepared for it. Reviewing and comparing the tests and quizzes would give him an idea on which topics he needs to study.

Other than the academic skill, the blogger also learned that a person should never give up and he keeps on learning throughout his entire life, and that all of the improvements that the blogger made did not come all at once.

4 0
3 years ago
An internet address that ends in .com is operated by
ollegr [7]
.com means company, so it is ran by a company.

4 0
3 years ago
Read 2 more answers
Why am I not able to see answers if I already have a brainly plus subscription?
kramer

Answer:

Try refreshing your page!

Explanation:

6 0
2 years ago
What are the possible values you can store in the C# "bool" data type?
Sergeeva-Olga [200]

Answer:

d are the values that can be stored in the c#"bool"data type

4 0
2 years ago
Hey guys.....Help pls 1 small question! I need it ASAP!!!!!!!!​
laila [671]

Answer:

I'm pretty Sure that is a yes.

Explanation:

It would make sense because even though it is a hyperlink the location is still different than the Original.

Hope this Helps!

6 0
3 years ago
Other questions:
  • Plato :
    14·2 answers
  • You can double-click a window’s title bar to maximize the window. true false
    9·1 answer
  • Chloe is building a kiosk-based Excel application. She wants to make some modifications to the screen elements in order to keep
    8·1 answer
  • True or False. When used with the cout object, the endl stream manipulator advances the cursor to the next line on the computer
    6·1 answer
  • Does anybody know how to unlock websites from school computer
    7·1 answer
  • The program DebugTwo2.cs has syntax and/or logical errors. Determine the problem(s) and fix the program.// This program greets t
    5·1 answer
  • Rolulzoss<br>A. State three positive uses of computers in the government sector​
    10·1 answer
  • Hey guys join me
    9·1 answer
  • The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c c
    6·1 answer
  • 100 POINTS!!! PLEASE HELP ME
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!