program menu_pilihan;
uses wincrt;
var harga,tambah,menu,total,jumlah,plus,i:longint;
var porsi,porsi2,jenis,nama,najen:string;
begin
writeln(' MENU-MENU ALA LAYLA ');
writeln(' -----------------------------');
writeln(' Menu Yang Tersedia');
writeln(' 1. Nasi Goreng Sapi ');
writeln(' 2. Nasi Goreng Ayam ');
writeln(' 3. Mie Goreng Sapi ');
writeln(' 4. Mie Goreng Ayam ');
writeln(' 5. Soto ');
writeln(' 6. Keluar ');
writeln;
write(' Masukkan menu pilihan anda : ');readln(menu);
case menu of
1: begin
harga:=6000;
nama:='Nasi Goreng Sapi';
write(' Porsi (kecil/sedang/besar) : ');readln(porsi);
write(' Jenis(DT/TH) : ');readln(jenis);
end;
2: begin
harga:=5000;
nama:='Nasi Goreng Ayam';
write(' Porsi (kecil/sedang/besar) : ');readln(porsi);
write(' Jenis(DT/TH) : ');readln(jenis);
end;
3: begin
harga:=6000;
nama:='Mie Goreng Sapi ';
write(' Porsi (kecil/sedang/besar) : ');readln(porsi);
write(' Jenis(DT/TH) : ');readln(jenis);
end;
4: begin
harga:=5000;
nama:='Mie Goreng Ayam ';
write(' Porsi (kecil/sedang/besar) : ');readln(porsi);
write(' Jenis(DT/TH) : ');readln(jenis);
end;
5: begin
harga:=4000;
nama:='Soto ';
write(' Porsi (kecil/sedang/besar) : ');readln(porsi);
write(' Jenis(DT/TH) : ');readln(jenis);
end;
6: begin
end;
end;
if porsi='besar' then
begin
tambah:=3000;
porsi2:='Besar';
end;
if porsi='sedang' then
begin
tambah:=2000;
porsi2:='Sedang';
end;
if porsi='kecil' then
begin
tambah:=1000;
porsi2:='Kecil';
end;
if jenis='DT' then
begin
plus:=0;
najen:='Di tempat';
end;
if jenis='TH' then
begin
plus:=2000;
najen:='Take Home';
end;
jumlah:=harga+tambah;
total:=jumlah+plus;
if menu<=5 then
begin
writeln;
writeln;
writeln(' =============================');
writeln;
writeln;
writeln(' Pesanan Anda ');
writeln;
writeln(' ',nama,' : ','Rp. ',jumlah,',-');
writeln(' Porsi : ',porsi2);
writeln(' Jenis : ',najen);
writeln(' Total : Rp. ',total,',-');
readkey();
end;
end.
http://Layla-innocent.blogspot.com
Tidak ada komentar:
Posting Komentar