program rumah;
uses crt;
var t,k:longint;
r,j:char;
procedure pl;
begin
repeat
clrscr;
write('Tipe Rumah [A/B/C/D] = ');readln(r);
until r in ['A','a','B','b','C','c','D','d'];
write('Kode Pembayaran = ');writeln(' T= TUNAI K= KREDIT');
repeat
gotoxy(1,5);write('Input Kode Pembayaran = ');gotoxy(28,5);readln(j);
until j in ['t','T','k','K'];
end;
procedure rmh(a,b:longint);
begin
if (r='A')or(r='a') then
begin
a:=50000000;
b:=500000;
end
else if (r='B')or(r='b') then
begin
a:=75000000;
b:=750000;
end
else if (r='C')or(r='c') then
begin
a:=85000000;
b:=850000;
end
else if (r='D')or(r='d') then
begin
a:=100000000;
b:=1000000;
end;
if (j='T')or(j='t') then
writeln('Harga Rumah Tipe ',r,' : Rp.',a)
else if (j='k')or(j='K') then
writeln('Angsuran Kredit Rumah Tipe ',r,' Per Bulan Rp.',b);
end;
begin
clrscr;
pl;writeln;
rmh(t,k);
readln;
end.
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar
Silahkan anda memberi komentar !!!!!