Code won't total
I'm trying to run a code that is supposed to come out with a total bill after a price and item amount input and can't figure out why the code isnt working. Any ideas on what i should try?
using namespace std;
int quantity; // contains the amount of items purchased
float itemPrice; // contains the price of each item
float totalBill; // contains the total bill.
cout << setprecision(2) << fixed << showpoint; // formatted output cout << "Please input the number of items bought" << endl; // Fill in the input statement to bring in the quantity. cin >> quantity; // Fill in the prompt to ask for the price. cout << "Please input the total cost of the items" << endl; // Fill in the input statement to bring in the price of each item. cin >> itemPrice; // Fill in the assignment statement to determine the total bill. cout << "The total bill is $"; // Fill in the output statement to print total bill, // with a label to the screen. cout << totalBill; totalBill = quantity * itemPrice; return 0;