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
Why is it difficult to detect a Trojan horse?
marishachu [46]

Answer:

Explanation:

Because the virus disguises it self as something you are trying to download, then it attackes your device

8 0
3 years ago
Read 2 more answers
How can you access the Help and Support system?
Ne4ueva [31]
By going to the person on the bottom and there should be a tab
5 0
3 years ago
Read 2 more answers
Whe you read anything online how do you know whether or not is coming from a reliable source?
lorasvet [3.4K]

You can find the author and research his/her credibility

You can cross-reference the information to other documentations

You can investigate the credibility of the overall website or community. Teachers like to say that community sites like wikipedia aren't very reliable.

4 0
3 years ago
Read 2 more answers
Approximately how many user accounts were affected by a 2013 hack of the yahoo technology company, which it just announced this
torisob [31]
About one billion user accounts were affected
3 0
4 years ago
Sophia's plays her favorite game on her phone, where the game uses the phone's
nirvana33 [79]

Answer:

Augmented Reality

Explanation:

Augmented reality is a camera to overlay images on real-world scenery. Basically what the Pokemon GO app does.

8 0
1 year ago
Other questions:
  • The ________ occurs when the user presses the enter key without typing a value for an input operation.
    5·1 answer
  • The next page and previous page buttons allow you to navigate through a worksheet while in print preview mode.
    6·1 answer
  • A developer has made a change to an Automation Anywhere TaskBot using the Enterprise Client interface. When running the bot from
    10·1 answer
  • Which is not a key factor a programmer uses in selecting the language for a project?
    9·1 answer
  • "In a web app, where is data usually stored? A. Mobile network B. Application storage C. Local computer D. Cloud storage"
    14·1 answer
  • A computer is an electronic device, operating under the control of instructions stored in its own _______________, that can acce
    7·1 answer
  • Is the following sentence true or false? During meiosis, the two alleles for each gene stay together. ______
    15·1 answer
  • III. FILL-IN THE BLANK (five points each)
    14·1 answer
  • Which of these is NOT a reason for an IP Address?
    15·2 answers
  • True or False. The 'C' programming language guarantees that R0 will always contain a zero value on the ATmega328P
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!