assalmulaikum sobat yang bahagia....:)
mau posting lagi nih, udah lama nggak posting di blog kangen..
aku mau posting tentang pemrograman dasar..materinya
tentang penggunaan procedur, perulangan...semoga bermanfaat...:) :)
program ujian_praktek;
uses crt;
var
no_reg,nama,alamat,kamar,harga: string;
ulang:char;
{program procedure}
procedure garis;
begin
writeln('=================================');
end;
procedure judul;
begin
writeln('ENTRY DATA PASIEN');
end;
procedure isi_data;
begin
write('No.Reg : ');readln(no_reg);
write('Nama Pasien : ');readln(nama);
write('Alamat : ');readln(alamat);
write('Kamar : ');readln(kamar);
write('Harga : ');
end;
procedure programnya;
begin
if kamar = 'VVIP' then write('Rp.1000000 - Rp.1500000')
else
if kamar = 'VIP' then write('Rp.500000 - Rp.750000')
else
if kamar = 'Kamar 1'then write('Rp.350000 - Rp.450000')
else
if kamar = 'Kamar 2' then write('Rp.150000 - Rp.250000');
end;
{PROGRAM UTAMA}
begin
ulang:='Y';
while ulang <> 'T' do
begin
clrscr;
writeln;
garis;
judul;
garis;
writeln;
isi_data; programnya;
writeln;
garis;
write('ISI DATA LAGI [Y/T] ? ');readln(ulang);
garis;
end;
readln;
end.