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
A manufacturing company has decided to be carbon free by 2030. What can it do to achieve this goal?.
olga2289 [7]

The company must take urgent steps to switch to renewable sources of energy in order to achieve their goal by 2030.

<h3>What is the meaning of carbon free?</h3>

The state of being carbon free implies that electricity is generated without relying on fossil fuels. We must recall that fossil fuels contain carbon hence they emit carbon dioxide when burnt.

For a manufacturing company to become carbon free they must take urgent steps to switch to renewable sources of energy in order to achieve their goal by 2030.

Learn more about fossil fuels: brainly.com/question/2029072

3 0
3 years ago
What is an input periphal
Lorico [155]
Anything that you can you to input actions or data into a computer. For example mice and keyboards are input peripherals because you use them to give the computer input of actions you want it to perform. This includes actions like opening a web browser with a mouse click or typing characters to the screen with a keyboard.

The opposite would be an output peripheral which would be something like the computer screen itself.
4 0
3 years ago
Read 2 more answers
The phrase ____ refers to an organization of components that define and regulate the collection, storage, management and use of
Burka [1]

Answer:

A. Database Management System

Explanation:

A Database Management System or DBMS is a set of programs that allow the DB administrator to the information extraction, storage and modification out of a database. It also provides tools to add, erase, modify or even analyze the data within the DB. Some examples of DBMS are MySQL, mongo DB, Ms SQL Server, etc.

3 0
4 years ago
A chain of coffee servers is sending a spreadsheet of projected costs and profits to some of its investors. When, Kyle, the admi
olga2289 [7]

Answer:

On a spreadsheet application including MS Excel;

He can select the image and hold down the <em>rotation</em> handle above it while sliding the mouse

Explanation:

Manual rotation of a picture or a text box can be performed by selecting the image or text box in MS Word or a spreadsheet application such as MS Excel. With the mouse select the rotation handle of the picture and drag in the direction desired, left or right.

So as to limit the rotation to 15 degrees hold down the shift button while dragging the rotation handle by clicking on it with a mouse and dragging in the desired direction

3 0
3 years ago
Heelp my brainly stuff says i am 49 but im 11 how to fix?X??
stich3 [128]

Make another account. But u cant get into brainly unless u r over 26 or something.

6 0
3 years ago
Other questions:
  • What is a collection?
    5·1 answer
  • Which of the following types does the Java programming language support?
    9·2 answers
  • You accidentally moved your task bar from the bottom of the screen to the left side. You would like to
    14·2 answers
  • End-user computer refers to a group of end users working together to manage their interactions with a computer.
    10·1 answer
  • Marie uses DHTML to create a website for her college. How is DHTML more helpful than HTML?
    13·2 answers
  • Regular languages are closed under complement. True False
    7·1 answer
  • All NATE specialties are offered at two levels, A. journeyman and master. B. installation and service. C. apprentice and journey
    7·1 answer
  • _____________programs and features are often integrated into video editing software.
    13·1 answer
  • Which practice enables recovery of accidental deletions in data records?
    11·1 answer
  • A program that performs handy tasks, such as computer management functions or diagnostics is often called a/an ____________.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!