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
The level of competition is an important factor for many people when selecting a physical activity.
Art [367]

Answer:

Its false

Explanation:

And this is because, the level of competition will matter when you are doing the mental activity, and in general when you are doing the physical activity then the level of competition never matters. And note that you are doing an activity which is always of one level in case of physical activity, and no sort of games where the competition does matter, and you need to beat the record all the time. You are in this situation challenged physically though always at one level which is fixed and known in advance, and how much exertion your body can withstand, and that is a competition in itself. However, no other competition or level is a factor in this scenario. Though in case of mental activity the requirement can vary at times, and hence requiring the varied level of competition.

6 0
3 years ago
Read 2 more answers
7.4 Lesson Practice (projectstem): what is output if the user is enters 2?​
Hatshy [7]

Answer:

18

Explanation:

lets go step by step.

the function called tryIt has a value, a variable named "a". this "a" variable will be whatever the user enters when the program says, Enter a number.

ok so if we enter "a" as 2, and b in the function will always be 7, and 2 + 7 equals 9,

and the ans variable (short for answer) will take the result of the function (9) and multiply it by 2,

then the answer is 18

3 0
3 years ago
Please someone participate in my typing race ...
dsp73

Answer:

what is typing race

this link can not be clicked

8 0
3 years ago
Test if a number grade is an A (greater than or equal to 90). If so, print "Great!". Sample Run Enter a Number: 98 Sample Output
Debora [2.8K]

Answer:

Using Python language :

a = eval ( input ( "Enter a mark please"))

if ( a <0){

print ("Invalid mark")};

else if (a >=90 && a <=100){ print

( "GREAT")};

Explanation:

7 0
3 years ago
How can i change ip address <br>​
JulijaS [17]

I believe your answer would be:

1: Open the command prompt window. Do this by clicking the "Start" button, and then selecting "Run." In the window that appears, type "cmd" into the text box and click the "OK" button.

2: Release the computer's current IP address. To do this, type "ipconfig /release" into the command prompt window and press Enter.

3: Acquire a new IP address. Do this by typing "ipconfig /renew" into the command prompt window and pressing Enter. This should assign the computer a new IP address, which will be different from the previous address.

4: Cycle your modem's power. If the above steps don't work, you can try renewing your IP address by cycling your modem's power. Turn off both your computer and your modem (and your router, if you have one). Wait at least 5 minutes, then turn everything back on. If your computer is set to receive an IP address dynamically (the most likely configuration), you should be assigned a new IP address automatically.

5: Check to make sure your IP address has changed. To do this, you can log on to a number of different websites that tell you your IP address.

Hope I helped, if so may I get brainliest and a thanks?

Thank you, Have a good day! =)

7 0
4 years ago
Other questions:
  • When troubleshooting firewalls, which of the following is not something you should do after you attempt a fix?
    7·1 answer
  • What will the following segment of code output if 11 is entered at the keyboard?
    12·1 answer
  • Write a c++ application that computes gross salary for Mr.A,given that during the interview session and before started work, it
    5·1 answer
  • What is the most important trait of the first pilot project in the AI Transformation Playbook?
    10·1 answer
  • 2) Show the decimal equivalent of each of the numbers if they are interpreted as (4 answers): 11001101 01101001 a. Unsigned bina
    15·2 answers
  • True or False: Wikipedia is a reliable source. ​
    5·2 answers
  • Which of the following are examples of software? (Select all that apply)
    9·2 answers
  • 2. What is software conflict?<br>​
    11·1 answer
  • You have a manager who makes decisions without getting input from anyone. They are unwilling to change anything once a decision
    14·1 answer
  • Que segnifica mmmju?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!