Question: Make this C + + code run. / * * * * * * * * * * * * * * * * *
Make this C code run.
Program to demonstrate a
simple cash register program
written by Sammy Student
today's date
# include
# include
using namespace std;
int main
declare and initialize the variables
int quantity ;
double price subtotal ;
double tax total ;
prompt user and receive the data
cout "please enter the item price: ;
cin price;
cout "please enter the item quantity: ;
cin quantity;
set the output manipulation values
cout.setfios::fixed ;
cout.precision;
process the input data and display the output
subtotal price quantity;
cout
subtotal: t$ setw subtotal endl;
tax subtotal ;
cout
tax: t$ setw tax endl;
total tax subtotal;
cout
total: t$ setw total endl;
cout
;
cout "press Enter to close this window
;
systempause;
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
