Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
33 views

Introduction To Computing (CS101) : Assignment # 03

The document describes an assignment to create a bill calculator application for a fast food restaurant. The program is to allow customers to order from a menu of items, calculate the total price including a 19% GST, and offer a 5% discount on bills over 1000 rupees. The program must display the full order details, tax calculations, any discount applied, and final payment amount.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Introduction To Computing (CS101) : Assignment # 03

The document describes an assignment to create a bill calculator application for a fast food restaurant. The program is to allow customers to order from a menu of items, calculate the total price including a 19% GST, and offer a 5% discount on bills over 1000 rupees. The program must display the full order details, tax calculations, any discount applied, and final payment amount.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Submitted By:

Introduction to Computing MC 200201449


(CS101)
Assignment # 03

Questions No 01 Marks (10)

You are required to make a bill calculator application for a fast food restaurant. The restaurant
offers some foods, that can be ordered by customers. Customer can order any number of items.
You should design a program to calculate bill accordingly.

Program should add 19% GST to the stated order by your customer. If the customer’s bill is
greater than 1000 rupees, the restaurant will give 5% discount on complete calculated bill.

You program must show the complete order details along with GST calculations, Discount (if
applicable) and final amount.

To design/code, please follow the stated steps:

1. Your program must show menu items on the program startup:


a) Pizza (Rs 999)
b) Burger (Rs 250)
c) Sandwich (Rs 150)
d) Paratha Roll (200)
2. Program must ask quantity for each item and calculate its total price.
3. Program will add 19% GST to the bill and Calculate total Bill.
4. Program will offer/give 5% discount if total bill is greater than 1000 Rs.
5. Show the payment along with all calculation (price, GST, discount) in proper format.

Answer:

#include <iostream>
#include <ctime>
#include <cstdlib>

using namespace std;

int main()
{
//Declaring variables
int Num_pizza,Num_burger,Num_sandwich,Num_paratha;
float gst,discount,total,net_total,order_amount;
//Displaying menu
cout<<"a) Pizza (Rs 999)\nb) Burger (Rs 250)\nc) Sandwich (Rs 150)\nd) Paratha Roll (Rs
200)\n";
//Taking input quantity of items
cout<<"Enter quantity of Pizza: ";
cin>>Num_pizza;
cout<<"Enter quantity of Burger: ";
cin>>Num_burger;
cout<<"Enter quantity of Sandwich: ";
cin>>Num_sandwich;
cout<<"Enter quantity of Paratha Roll: ";
cin>>Num_paratha;
//Calculating total
order_amount = (999 * Num_pizza) + (250 * Num_burger) + (150 * Num_sandwich) + (200 *
Num_paratha);
//Calculating gst
gst = 0.19 * order_amount;
//Calculating total
total = order_amount + gst;
//Calculating discount
if (total > 1000)
discount = 0.05 * total;
else
discount = 0;
//Calculating net total
net_total = total - discount;

//Displaying all bill


cout<<"\nPayment:"<<endl;
cout<<"Price: "<<order_amount<<endl;
cout<<"GST: "<<gst<<endl;
cout<<"Discount: "<<discount<<endl;
cout<<"Total: "<<net_total<<endl;
}

You might also like