-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyJava cafe.cpp
More file actions
35 lines (31 loc) · 855 Bytes
/
Copy pathMyJava cafe.cpp
File metadata and controls
35 lines (31 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <iostream>
using namespace std;
int main()
{
string order;
float price=0,charges=7.00,total=0,overnight=5;;
char option;
cout<<"Welcome to MyJava Cafe"<<endl;
cout<<"Dear Customer:\n What you want to Order? \n Please Enter Your dish name: "<<endl;
getline (cin,order);
cout<<"Enter Price (Rs): ";
cin>>price;
price=price/100;
cout<<"Overnight delivery? \n Please Enter Y for Yes and N for No: ";
cin>>option;
cout<<"Invoice: "<<endl;
cout<<order<<endl;
cout<<"Price: "<<price<<" $"<<endl;
if (option=='Y')
{
cout<<"Shippind Charges: "<<charges<<" $"<<" + overnight delivery Charges "<<overnight<<endl;
total=price+charges+overnight;
}
else
{
cout<<"Shippind Charges: "<<charges<<" $"<<endl;
total=price+charges;
}
cout<<"Total Price: "<<total<<"$"<<endl;
return 0;
}