Question: Problem Statement Write a program to compute a bill. It prompts the user three times to enter an item name and a price. The price
Problem Statement
Write a program to compute a bill. It prompts the user three times to enter an item name and a price. The price must be stored as floating point value. It then computes the total and outputs it to the console.
WARNING: Be sure to add a space before and after each operator, eg write cout value; instead of cout
#include
using namespace std;
int main
declare variables for three item names
string item;
declare variable named item
declare variable named item
declare variables for three item prices
float price;
declare variable named price
declare variable named price
cout "Item : ;
cout "Price : ;
cout "Item : ;
cout "Price : ;
cout "Item : ;
cout "Price : ;
float total
; compute sum in order of prices and
cout "Total:
;
return statement
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
