Dan Scriptnya :
program sewamobil;
uses crt;
var
nm,nmmobil,almt,kd:string;
hrg,lm,ttl,ubay,ukem:real;
begin
clrscr;
writeln('------------TAMA RENT CAR---------------');
writeln(' we will serve you ');
writeln('|||||||||||||||||||||||||||||||||||||||||||||||||||||||');
writeln('KodeMobil JenisMobil Harga/hari');
writeln('|||||||||||||||||||||||||||||||||||||||||||||||||||||||');
writeln('ALP ALPHARD Rp.1.000.000');
writeln('XNA XENIA Rp.500.000');
writeln('AVZ AVANZA Rp.600.000');
writeln('LRV LANDROVER Rp.800.000');
writeln('========================================');
write('nama Penyewa :');readln(nm);
write('Alamat :');readln(almt);
write('Masukan Kode Mobil:');readln(kd);
if kd='ALP' then
begin
nmmobil:='ALPHARD';
hrg:=1000000;
end
else if kd='XNA' then
begin
nmmobil:='XENIA ';
hrg:=500000;
end
else if kd='AVZ' then
begin
nmmobil:='AVANZA';
hrg:=600000;
end
else
begin
nmmobil:='LAND ROVER';
hrg:=800000;
end;
write('Masukkan Lama Sewa:');readln(lm);
ttl:=lm*hrg;
clrscr;
writeln('------------TAMA RENT CAR-------------');
writeln(' we will serve you ');
writeln('||||||||||||||||||||||||||||||||||||||');
writeln('Nama Penyewa :',nm);
writeln('Alamat Penyewa :',almt);
writeln('Kode Mobil :',kd);
writeln('Nama Mobil :',nmmobil);
writeln('Harga/Hari :Rp.',hrg:2:0);
writeln('Lama Sewa :',lm:2:0,'Hari');
writeln('Total Sewa :Rp.',ttl:2:0);
writeln('=======================================');
write('Uang Bayar :Rp.');readln(ubay);
ukem:=ubay-ttl;
writeln('Uang Kembali :Rp.',ukem:2:0);
writeln('=======================================');
writeln(' THANK YOU ^_^ ');
writeln('=======================================');
readln;
end.
Dan Ini Hasil Ahkirnya
0 komentar:
Post a Comment