Program sederhana Penyewaan Mobil dengan Pascal untuk sorce di bawah ini, selamat mencoba ,
Sorce Code :
uses crt;
label
awal,akhir;
procedure garis;
begin
writeln(‘==============================================’);
end;
var
jm,mm:array [1..10] of string;
ls,h,tt:array [1..10] of longint;
j:char;
a: byte;
b:string;
begin
awal:
clrscr;
gotoxy(35,1);writeln(‘PENYEWAAN MOBIL’);
garis;
gotoxy(1,3);write(‘Nama Penyewa :’);readln(b);
writeln;
for a:= 1 to 1 do
begin
write(‘Jenis Mobil :’);readln(jm[a]);
if jm[a] =’J’ then
begin
mm[a]:=’Cheroke’;
h[a]:=500000;
end;
if jm[a]=’S’ then
begin
mm[a]:=’Baleno’;
h[a]:=600000;
end;
writeln(‘Merk Mobil :’,mm[a]);
write(‘Lama sewa :’);readln(ls [a]);
tt[a]:= ls[a]*h[a];
writeln(‘Total :’,tt[a]);
garis;
gotoxy(35,11);writeln(‘STRUK PENYEWAAN’);
garis;
gotoxy(1,13);writeln(‘Nama:’,(b));
garis;
gotoxy(5,15);writeln(‘| No| Jenis Mobil | Merk Mobil | Lama sewa | Harga | Total |’);
garis;
for a:= 1 to 1 do
gotoxy(1,17);writeln(a:7,jm[a]:14,mm[a]:16,ls[a]:12,h[a]:11,tt[a]:12);
garis;
write(‘Input Lagi :’);readln(j);
if j=’Y’ then
goto awal
else
goto akhir;
akhir:
readln;
end;
end.
Output Program :
Program Pascal Sederhana Penyewaan Mobil
Judul | : | Program Pascal Sederhana Penyewaan Mobil |
Url | : | https://gudangilmu1991.blogspot.com/2013/10/blog-post_72.html |
Pada | : | Sabtu, 26 Oktober 2013 |
Oleh | : | Gudang Ilmu |
Respond | : | 0 |
Share | : |
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar