subject

Reading and Writing to a File Bring in billfile. cpp from the Lab 5 folder.
The code is as follows:

// This program will read in the quantity of a particular item and its price.
// It will then print out the total price.
// The input will come from a data file and the output will go to
// an output file.
// PLACE YOUR NAME HERE
#include
#include
using namespace std;
int main()
{
ifstream dataIn; // defines an input stream for a data file
ofstream dataOut; // defines an output stream for an output file
int quantity; // contains the amount of items purchased
float itemPrice; //contains the price of each item
float totalBill; //contains the total bill. The price of all items
dataIn. open("transaction. dat"); // This opens the file.
dataOut. open("bill. out");
// Fill in the appropriate code in the blank below
<< setprecision(2) << fixed << showpoint; // formatted output
// Fill in the input statement that brings in the
// quantity and price of the item.
// Fill in the assignment statement that determines the totalbill.
// Fill in the output statement that prints the total bill,
// with a label, to an output.
return 0;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
This statement accurately describes how headlines should be placed in business documents.
Answers: 3
question
Computers and Technology, 22.06.2019 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
question
Computers and Technology, 22.06.2019 11:30
Awell-diversified portfolio needs about 20-25 stocks from different categories is this true or false?
Answers: 2
question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
You know the right answer?
Reading and Writing to a File Bring in billfile. cpp from the Lab 5 folder.
The code is as fo...
Questions
question
Social Studies, 26.09.2019 02:30
Questions on the website: 13722361