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, 23.06.2019 01:20
Write a function balancechemical to balance chemical reactions by solving a linear set of equations. the inputs arguments are: reagents: symbols of reagents in string row array products: symbols of products in string row array elements: elements in the reaction in string row array elcmpreag: elemental composition of reactants in two dimensional numeric array elcmpprdcts: elemental composition of prducts in two dimensional numeric array hint: the first part of the problem is setting up the set of linear equations that should be solve. the second part of the problem is to find the integers from the solution. one way to do this is to mulitiply the rational basis for the nullspace by increasing larger integers until both the left-and right-side integers exist. for example, for the reaction that involves reacting with to produce and : reagents=["ch4", "o2"]; products =["co2", "h2o"]; elements =["c","h", "o"] elcmpreag=[1,4,0;
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
Where can page numbers appear? check all that apply. in the header inside tables in the footer at the bottom of columns at the top of columns
Answers: 1
question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
(, urgent need): how do i change my username
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
Physics, 15.12.2020 15:40
question
English, 15.12.2020 15:40
question
Mathematics, 15.12.2020 15:40
question
Mathematics, 15.12.2020 15:40
Questions on the website: 13722360