Question: / / This program will read in the quantity of a particular item and its price. / / It will then print out the total
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;
ofstream dataOut;
int quantity;
float itemPrice;
float
totalBill;
defines an input stream for a data file
defines an output stream for an output file
contains the amount of items purchased
contains the price of each item
contains the total bill, ie the price of all items
dataIn.opentransactiondat"; This opens the file.
dataOut.openbillout";
Fill in the appropriate code in the blank below
setprecision 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 total bill.
Fill in the output statement that prints the total bill, with a label,
to an output file
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
