Home Pemprograman (Pascal) Contoh Program Sederhana - Tarif Parkir Kendaraan Di Pascal

Contoh Program Sederhana - Tarif Parkir Kendaraan Di Pascal

Aplikasi Sederhana - Tarif Parkir Kendaraan Di Pascal (By Ronny Liem)
Aplikasi Sederhana - Tarif Parkir Kendaraan Di Pascal



program Parking;
uses Crt;
var
N1,N2,N3:String;
iK,iL:Integer;
J1,J2,J3,Tarif:LongInt;
begin
clrscr;
N1:='Motor';
J1:=2000;
N2:='Mobil';
J2:=3000;
N3:='Mobil Box';
J3:=5000;
WriteLn('                       APLIKASI SEDERHANA - TARIF PARKIR KENDARAAN                         ');
WriteLn('===========================================================================================');
WriteLn('| TIPE KENDARAAN :  1. Motor              | 2. Mobil              | 3. Mobil Box          |');
WriteLn('===========================================================================================');
WriteLn(' KETERANGAN      :  1 Jam Pertama  = 2000 | 1 Jam Pertama  = 3000 | 1 Jam Pertama  = 5000  ');
WriteLn('                    Jam Berikutnya = 1000 | Jam Berikutnya = 2000 | Jam Berikutnya = 3000  '); 
WriteLn('===========================================================================================');
Write  (' > Tipe Kendaraan    : '); ReadLn(iK);
Write  (' > Lama Waktu Parkir : '); ReadLn(iL);
if (iK=1) then
begin
Tarif:=J1+(iL-1)*1000;
end
else if (iK=2) then
begin
Tarif:=J2+(iL-1)*2000;
end
else if (iK=3) Then
begin
Tarif:=J3+(iL-1)*3000;
end;
WriteLn(' > Biaya Parkir : ',Tarif);
WriteLn(' THANKS YOU FOR USING MY SIMPLE PROGRAM ');
readln;
end.

Seseorang yang jatuh cinta dengan Teknologi