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 key do I use to start my presentation
Len [333]

Answer:

The answer to this question is given below in this explanation section.

Explanation:

Knowing how o start a presentation is crucial if you fail to capture the audience attention right of the bat your entire presentation will flop.Few listeners will stick with you to the end and retain what you have told.

That is mildly unpleasant when you are doing an in house presentation in front of your colleagues.But can become utterly embrassing when you are presenting in front of larger audience presentation to prospective customers.

Let you have most of your presentation slides and polished up you dont check and quick and effective power point presentation design tips.Many ideas are broken into bits sized statements for your slides and complemented with visuals.The best way is to appeal and invoke certain emotions with your audience curiosity,surprise fear or good old amusements.

8 0
3 years ago
Filtering is a function of _____.
Levart [38]
The answer is: switches.

Explanation:

Filtering is a function of switches.
3 0
2 years ago
Which of the following translates packets so that the node can understand them once they enter through a port?
podryga [215]
Hi
D)A NICHappy to assist you!
8 0
3 years ago
Read 2 more answers
Read each example from the opening of a speech on the topic of video gaming. Identify the type of hook being used According to a
skelet666 [1.2K]

Answer:

it goes c, b, b, a

Explanation:

6 0
2 years ago
Save an image as a separate file by right-clicking the image and then clicking this option at the
Olenka [21]

Answer:

Save image as

Explanation:

6 0
2 years ago
Read 2 more answers
Other questions:
  • Creating calendar events prevents individuals from being able to schedule a time to collaborate.
    11·1 answer
  • What financial behaviors will typically lead to a low credit score?
    14·1 answer
  • To hide the ribbon, ______ on any one of the tabs of the ribbon.
    10·1 answer
  • Write a program in Python that reads in investment amount, annual interest rate, and number of years, and displays the future in
    6·1 answer
  • Every call to a recursive function has its own code and its own set of ____ and local variables
    5·1 answer
  • What is episodic memory? knowledge about words, concepts, and language-based knowledge and facts information about events we hav
    10·1 answer
  • Which job role requires you to create user guides for computer products and services?
    11·1 answer
  • What is the data type of the following expression?
    12·2 answers
  • 100 points, PLEASE HELP...To generate numbers between and including -10 to 10 you would use:
    5·1 answer
  • In this exercise you will debug the code which has been provided in the starter file. The code is intended to do the following:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!