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
Lemur [1.5K]
2 years ago
13

This program uses hours, pay rate, state tax and fed tax to determine gross

Computers and Technology
1 answer:
Kryger [21]2 years ago
8 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
How fast can the winds blow in a tornado?
sp2606 [1]
Over 200 mph generally now I says 300 mph
6 0
3 years ago
Read 2 more answers
How can i clear the CMOS​
motikmotik

Explanation:

Steps to clear CMOS using the battery method

Turn off all peripheral devices connected to the computer.

Disconnect the power cord from the AC power source.

Remove the computer cover.

Find the battery on the board. ...

Remove the battery: ...

Wait 1–5 minutes, then reconnect the battery.

Put the computer cover back on.

4 0
3 years ago
How long does it take to get your alignment fixed?
GarryVolchara [31]
This isn't a computer-related question...

But, lucky for you, I took some automotive in high school. Usually, it depends on equipment used and how many clients they have. Usually, it is done within an hour. 
8 0
2 years ago
Discuss the economical challenges in software reuse using suitable examples.
Liula [17]

Answer: Reusing software device has some economical challenges such as:

  • Investment cost in reusing the device is considered as the extra cost.It  might require some extra components for the working to become usable
  • Requires skilled person who can develop and design the software to be used again.The creating and designing of new software design is comparatively easy but making the system reusable requires someone who has more designing skill who will be highly paid for the work
  • Cost of writing and reading of the software can also be considered as the economical challenge as the reused system created is to be studied by some other organization members or sources not familiar with the functioning. .

4 0
3 years ago
How do medical detectives investigate their cases?
tensa zangetsu [6.8K]

Answer:

Analyze genetic testing results to diagnose disease and study DNA evidence found at a “crime scene.” They solve medical mysteries through hands-on projects and labs, investigate how to measure and interpret vital signs, and learn how the systems of the human body work together to maintain health.

Explanation:

I answered it under the wrong part but this is same thing i put before.

4 0
3 years ago
Read 2 more answers
Other questions:
  • You are tasked with setting up an employee’s computer.Instead of a new computer,she will be using a computer with an older opera
    11·2 answers
  • How is the Task Manager helpful in displaying which resources your computer is using and how fast?
    5·2 answers
  • Which of the following best explains why some people invest their saving in the stock market and others put their saving in bank
    5·2 answers
  • When someone registers a domain name that is a company's trademark, hoping to resell it to the company at an exorbitant profit,
    14·2 answers
  • Add a new row to a table by clicking in the
    10·1 answer
  • Suppose you present a project and your supervisor comments that the graphics need to be a higher quality and suggests you replac
    9·2 answers
  • Will mark Brainliest!! What is the best hard disk compacity? Why?
    7·1 answer
  • How does an extranet work?
    15·1 answer
  • Chantal has configured the network at her company's new headquarters with a number of VLANs. All devices joined to the individua
    7·1 answer
  • what component of virtualization controls all physical memory, and thus has the ability to make any unused memory pages in each
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!