program sewa;
var
listHari : array[1..4] of string=('senin','selasa','rabu','kamis','jumat');
hari: string;
jam,harga,kerja:longint;
begin
writeln('###########Daftar Harga Sewa###########');
writeln('1. Hari Biasa + Jam Kerja -> Rp.100000);
writeln('2. Hari Biasa + Sore/Malam -> Rp.150000');
writeln('3. Hari Libur -> Rp.200000');
writeln('=======================================');
writeln('Formulir Penyewaan');
write('-> Hari : ');readln(hari);
write('-> Jam : ');readln(jam);
for i:=1 to 6 do
if hari=listHari[i] then
kerja:=0;
break;
else
kerja:=1;
if (kerja = 0) then
if ((jam >= 7) and (jam <= 17)) then
harga:=100000;
else
harga:=150000;
else;
harga=200000;
writeln('Pemesanan pada hari ',hari,' jam ',jam,'.00 harganya ',harga);
end.
var
listHari : array[1..4] of string=('senin','selasa','rabu','kamis','jumat');
hari: string;
jam,harga,kerja:longint;
begin
writeln('###########Daftar Harga Sewa###########');
writeln('1. Hari Biasa + Jam Kerja -> Rp.100000);
writeln('2. Hari Biasa + Sore/Malam -> Rp.150000');
writeln('3. Hari Libur -> Rp.200000');
writeln('=======================================');
writeln('Formulir Penyewaan');
write('-> Hari : ');readln(hari);
write('-> Jam : ');readln(jam);
for i:=1 to 6 do
if hari=listHari[i] then
kerja:=0;
break;
else
kerja:=1;
if (kerja = 0) then
if ((jam >= 7) and (jam <= 17)) then
harga:=100000;
else
harga:=150000;
else;
harga=200000;
writeln('Pemesanan pada hari ',hari,' jam ',jam,'.00 harganya ',harga);
end.
0 comments:
Posting Komentar