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
Which type of image would require you to obtain permission from the author to use the image and possibly pay a royalty to the au
ASHA 777 [7]

Answer:

Copyrighted.

Explanation:

Patent can be defined as the exclusive or sole right granted to an inventor by a sovereign authority such as a government, which enables him or her to manufacture, use, or sell an invention for a specific period of time.

Generally, patents are used on innovation for products that are manufactured through the application of various technologies.

Basically, the three (3) main ways to protect an intellectual property is to employ the use of

I. Trademarks.

II. Patents.

III. Copyright.

Copyright law can be defined as a set of formal rules granted by a government to protect an intellectual property by giving the owner an exclusive right to use while preventing any unauthorized access, use or duplication by others.

Hence, a copyrighted image would require you to obtain permission from the author to use the image and possibly pay a royalty to the author for its use.

7 0
2 years ago
From the computer desktop, clicking the Start button lets you _____.
stepan [7]
Locate and open Excel
8 0
3 years ago
Read 2 more answers
Jim is creating a form with validation. What are the two validation modes available to him?
Charra [1.4K]
Basic validation
Data validation
6 0
2 years ago
Applying Time Management Techniques
tatuchka [14]

Answer:

Most students start out each new semester of school with high expectations. They envision themselves being successful in their studies and school work but they fail to put together a realistic plan, or establish a routine, that will enable them to achieve academic success. There are only so many hours in a day, days in a week, and weeks in a term. And if you don't pay attention, the end of the semester will arrive before you know it – catching you by surprise. To achieve academic success, you must carefully manage your study time on a daily, weekly, and semester basis. The following is a time management strategy for doing exactly that.

Explanation:

7 0
3 years ago
After updating business information, what's next to click?
Shtirlitz [24]

Answer:

B. i think????!!

Explanation:

i answer that.

8 0
2 years ago
Other questions:
  • When people need information, they typically turn to:
    7·1 answer
  • Web pages with personal or biograpic information are called ​
    10·1 answer
  • ___________ is a mass-produced, copyrighted software that meets the needs of a wide variety of users, not just a single user or
    15·1 answer
  • An interpreter _______. converts the procedural language one statement at a time converts the source code into machine language
    12·1 answer
  • IOS jail broken or Android unrooted which is better to hack with
    6·1 answer
  • PLEASE HELP ASAP!!
    11·1 answer
  • Which of these is NOT an example of a GUI?
    7·1 answer
  • 1. What are the advantages and disadvantages of technology in communication?
    9·2 answers
  • Lynn has created a quarterly sales report using a word processor. The document is confidential, and Lynn wants to secure it with
    8·1 answer
  • You can merge the cells using the rowspan and colspan attribute of the tag <br> true or false​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!