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]
3 years ago
13

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

Computers and Technology
1 answer:
Kryger [21]3 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
Where can the container code be found in Google Tag Manager? (select all answers that apply) a. In a pop-up window after you cre
saveliy_v [14]

Answer:

Option A and C.

Explanation:

The container code can be located in Google Tag Manager inside a pop-up window when they set up an account as well as container and Under "Admin" through choosing that container and clicking Installing Google Tag Manager.

The main advantage for Google Tag Manager, ever though, would be that it create it in much easier manner for marketing companies to execute identifiers without depends on developers to use it. Developers tend to also be preoccupied with some other high-priority initiatives so tagging mostly finishes up on the other side burner

7 0
3 years ago
List three types of technical information sources that an IS professional might use when researching a new storage technology an
drek231 [11]

Answer:

The three types of technical information sources are:      

Vendor and manufacturer Web sites.

Technology-oriented Web sites and publications.

Professional society Web sites.              

Explanation:

Professional society Web sites provide most unbiased information.

These professional social websites are non profit companies as opposed to other sources of information that are profit making.

Social websites provides with the information that can help their members in a best way about getting information of their interest. This is done in an unbiased way because they do not work for some specific organizations or companies that want to sell their products or services.

7 0
4 years ago
Select the correct answer.
vredina [299]
The answer is B I did the test
4 0
3 years ago
In which scenario would instant messaging be more useful than other forms of communication?
ivann1987 [24]
When you're busy doing things and/or be too sick for over the phone communication
7 0
3 years ago
Color theory is a type of code, like HTML, that computers use to visually display colors.
mars1129 [50]

I think that it is a true or false question and I would say true

7 0
3 years ago
Other questions:
  • Identifying Characters
    11·2 answers
  • What represents the loss of a network signal strength measured in decibels (dB) and occurs because the transmissions gradually d
    7·1 answer
  • How to select the entire table in microsoft excel
    11·1 answer
  • My rank hasn't changed even though i've passed the point mark and i even tried to relogin but it still didn't change.
    15·2 answers
  • The common programming structure that implements "conditional statements" is called an____ statement.
    7·1 answer
  • Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate t
    14·1 answer
  • I am a you tuber that does videos on the rob lox myth community, I have over 250+ subscribers. I was wondering if any of y'all w
    14·1 answer
  • match the parts of a project plan listed in Column A to the specific examples given in Column B.Write the letter of your answer
    13·1 answer
  • How do you open an application on the macOS?
    11·2 answers
  • If you need any answer answered faster check out Wolframalpha.com
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!