Object :
1. Televisi = Harga nya Rp.175000
2. DVD Player = Harga nya Rp.650000
3. CD ROOM = Harga nya 450000
uses crt;
Var
kode:byte;
harga,jumlah:longint;
th:longint;
nama:string;
begin
clrscr;
Writeln('INPUTKAN KODE PENJUALAN');
Writeln('------------------------------------------');
Write('KODE :');readln(kode);
case kode of
1 : begin
clrscr;
NAMA:=' "TELEVISI"';
Writeln('NAMA :',nama);
Writeln('---------------------------------');
HARGA:= 1750000;
Writeln('HARGA : ',harga);
Writeln('-----------------------------------');
write('JUMLAH BELI :');readln(jumlah);
th:=harga*jumlah;
writeln('-------------------------------------');
writeln('TOTAL HARGA :',th);
end;
2 : begin
clrscr;
NAMA:=' "DVD PALYER"';
Writeln('NAMA :',nama);
Writeln('-----------------------------------');
HARGA:= 650000;
Writeln('HARGA : ',harga);
Writeln('-----------------------------------');
write('JUMLAH BELI :');readln(jumlah);
th:=harga*jumlah;
writeln('-----------------------------------');
writeln('TOTAL HARGA :',th);
end;
3 : begin
clrscr;
NAMA:=' "CD ROOM"';
Writeln('NAMA :',nama);
Writeln('-------------------------------------');
HARGA:= 450000;
Writeln('HARGA : ',harga);
Writeln('____________________');
write('JUMLAH BELI :');readln(jumlah);
th:=harga*jumlah;
writeln('____________________');
writeln('TOTAL HARGA :',th);
end;
end;
readln;
end.
Screen Shot Hasil :
kode 1:
kode 2
kode 3
bansat bikin code si hidden
ReplyDelete