Program kasir Pascal HP
program KasirKebab;
uses crt;
var harga, jml, bayar, total : Integer;
nama, kode : String;
begin
clrscr;
WriteLn('**************************************');
WriteLn('**************************************');
WriteLn(' KEBAB TURKI CUTEE ');
WriteLn('Alamat : Jl. Raya Sukatani - Cikarang ');
WriteLn('**************************************');
WriteLn('**************************************');
Write('Masukan Kode Barang = ');readln(kode);
if kode='B01' then
begin
nama:='Kebab Besar + Keju';
harga:=25000;
end
else if kode='B02' then
begin
nama:='Berger Keju';
harga:=15000;
end
else if kode='B03' then
begin
nama:='Berger Kecil';
harga:=5000;
end;
WriteLn('Nama Barang = ',nama);
WriteLn('Harga barang = ',harga);
WriteLn;
Write('Masukan Jumlah Beli = '); readln(jml);
total:=harga*jml;
WriteLn('Total Harga = ',total);
WriteLn;
Write('Masukan Pembayaran = ');ReadLn(bayar);
if bayar >=total then
begin
WriteLn('Kembalian Anda = ',bayar-total);
end
else
WriteLn('Hutang Anda = ',total-bayar);
WriteLn;
WriteLn('====================================');
writeln(' Terimaksih ');
writeln(' Selamat Datang Kembali ');
WriteLn('====================================');
readkey;
readln;
end.
uses crt;
var harga, jml, bayar, total : Integer;
nama, kode : String;
begin
clrscr;
WriteLn('**************************************');
WriteLn('**************************************');
WriteLn(' KEBAB TURKI CUTEE ');
WriteLn('Alamat : Jl. Raya Sukatani - Cikarang ');
WriteLn('**************************************');
WriteLn('**************************************');
Write('Masukan Kode Barang = ');readln(kode);
if kode='B01' then
begin
nama:='Kebab Besar + Keju';
harga:=25000;
end
else if kode='B02' then
begin
nama:='Berger Keju';
harga:=15000;
end
else if kode='B03' then
begin
nama:='Berger Kecil';
harga:=5000;
end;
WriteLn('Nama Barang = ',nama);
WriteLn('Harga barang = ',harga);
WriteLn;
Write('Masukan Jumlah Beli = '); readln(jml);
total:=harga*jml;
WriteLn('Total Harga = ',total);
WriteLn;
Write('Masukan Pembayaran = ');ReadLn(bayar);
if bayar >=total then
begin
WriteLn('Kembalian Anda = ',bayar-total);
end
else
WriteLn('Hutang Anda = ',total-bayar);
WriteLn;
WriteLn('====================================');
writeln(' Terimaksih ');
writeln(' Selamat Datang Kembali ');
WriteLn('====================================');
readkey;
readln;
end.
Komentar
Posting Komentar