-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPet Shop
133 lines (131 loc) · 3.89 KB
/
Pet Shop
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#include <iostream>
#include <stdlib.h>
using namespace std;
int main(){
char again1;
int total, bayar;
do{
cout<<"====================================================\n";
cout<<"\\\\\\\\" << " \t\tDIFTA PET SHOP"<<"\t\t ////\n";
cout<<"====================================================\n";
cout<<"\n";
cout<<" \t >< W E L C O M E >< ";
cout<<"\n";
cout<<"\n";
cout<<"==================\n";
cout<<" Our shop sell : \n";
cout<<"==================\n";
cout<<" 1. Pet \n 2. Pet Supplies\n";
cout<<"==================\n";
int pilih, pil_pet, much, total, pil_items;
char again;
cout<<"\n";
cout<<"What do you need : ";
cin>>pilih;
system("cls");
switch(pilih){
case 1 :
do{
cout<<"==============================================\n";
cout<<"\t\t PET\n";
cout<<"==============================================\n";
cout<<"----------------------------------------------\n";
cout<<"|\tSpecies\t \t| \tPrice\t |\n";
cout<<"----------------------------------------------\n";
cout<<"|1. Persia\t\t|\tRp 2.000.000 |\n|2. Anggora\t\t|\tRp 1.000.000 |\n|3. British Shorthair\t|\tRp 10.000.000|\n|";
cout<<"4. Siam\t\t|\tRp 1.000.000 |\n|5. Ragdoll\t\t|\tRp 2.000.000 |\n|6. Bengal\t\t|\tRp 10.000.000|\n";
cout<<"----------------------------------------------\n\n";
cout<<"What species do yo want to buy : ";
cin>>pil_pet;
cout<<"How much do you buy it : ";
cin>>much;
switch(pil_pet){
case 1 :
total += 2000000*much;
break;
case 2 :
total += 1000000*much;
break;
case 3 :
total += 10000000*much;
break;
case 4 :
total += 1000000*much;
break;
case 5 :
total += 2000000*much;
break;
case 6 :
total += 10000000*much;
break;
}
cout<<"Do you want buy again <y/n> : ";
cin>>again;
system("cls");
}while(again=='y');
break;
case 2 :
do{
cout<<"==============================================\n";
cout<<"\t\t PET SUPPLIES\n";
cout<<"==============================================\n";
cout<<"----------------------------------------------\n";
cout<<"|\tItems\t\t| \tPrice\t |\n";
cout<<"----------------------------------------------\n";
cout<<"|1. Cage\t\t|\tRp 100.000 |\n|2. Wet Food 500g\t|\tRp 20.000 |\n|3. Dry Food 500g\t|\tRp 28.000 |\n";
cout<<"|4. Complete Medicine \t|\tRp 150.000 |\n|5. Shampoo\t\t|\tRp 50.000 |\n|6. Toys\t\t|\tRp 10.000 |\n|7. Vitamin\t\t|\tRp 80.000 |\n";
cout<<"----------------------------------------------\n\n";
cout<<"What items do yo want to buy : ";
cin>>pil_items;
cout<<"How much do you buy it : ";
cin>>much;
switch(pil_items){
case 1 :
total += 100000*much;
break;
case 2 :
total += 20000*much;
break;
case 3 :
total += 28000*much;
break;
case 4 :
total += 150000*much;
break;
case 5 :
total += 50000*much;
break;
case 6 :
total += 10000*much;
break;
case 7 :
total += 80000*much;
break;
}
cout<<"Do you want buy again <y/n> : ";
cin>>again;
system("cls");
}while(again=='y');
break;
}
cout<<"===========================================\n";
cout<<"Do you want back to the homepage <y/n> : ";
cin>>again1;
system("cls");
if(again1=='n'){
cout<<"=========================\n";
cout<<"Total pembelanjaan anda : Rp "<<total<<"\n";
cout<<"Uang yang anda bayar : Rp ";
cin>>bayar;
cout<<"=========================\n";
cout<<"Total pembelanjaan anda : Rp "<<total<<"\n";
cout<<"Uang yang anda bayar : Rp "<<bayar<<"\n";
cout<<"========================= ____________\n";
cout<<"Kembalian anda Rp "<<bayar-total<<"\n";
cout<<"\n";
cout<<" Terima Kasih Atas \n Belanjaannya\n";
cout<<"\n";
cout<<" ^><^ \n";
}
}while(again1=='y');
}