Selasa, 19 Juni 2012


Program pendataan buku:
Source code:
program pendataanbukuHengki;
uses wincrt;
const maks = 90;
type recbuku = record
kode : string[20];
judul : string[20];
eks : integer;
harga : real;
end;
var
buku : recbuku;
dafbuku : array [1..maks] of recbuku;
j,cacah : integer;
pilih : char;
begin
repeat
writeln('===================================================');
 writeln ('menu pilihan');
writeln ('[1]. memasukan data buku');
writeln ('[2]. lihat daftar buku');
writeln ('[3].selesai');
writeln('===================================================');
writeln;
write ('Pilihan Proses :');readln (pilih);
case pilih of
'1' : begin
write ('berapa buku ?');readln (cacah);
for j:=1 to cacah do
begin
writeln ('Data ke -',j);

write('kode buku :');readln(buku.kode);

write('judul buku :');readln(buku.judul);

write('eksemplar :');readln(buku.eks);

write('harga buku:');readln(buku.harga);

end;
end;
'2' : begin
writeln('====================================================');
writeln('=====================Data Buku======================');
writeln('No          kode Buku         eks         Judul Buku        Harga');
for j:=1 to cacah do
begin
with dafbuku[j] do
writeln(j,#32, buku.kode:15,#32,buku.eks:15,#32,buku.judul:15,#32,buku.harga:15:2);

writeln('====================================================');

           end;
end; end;
Until pilih= '3' ;

end.
'1' : begin
write ('berapa buku ?');readln (cacah);
for j:=1 to cacah do
begin
writeln ('Data ke -',j);

write('kode buku :');readln(buku.kode);

write('judul buku :');readln(buku.judul);

write('eksemplar :');readln(buku.eks);

write('harga buku:');readln(buku.harga);

end;
end;
'2' : begin
writeln('====================================================');
writeln('=====================Data Buku======================');
writeln('No          kode Buku         eks         Judul Buku        Harga');
for j:=1 to cacah do
begin
with dafbuku[j] do
writeln(j,#32, buku.kode:15,#32,buku.eks:15,#32,buku.judul:15,#32,buku.harga:15:2);

writeln('====================================================');

Output :

1 komentar:

  1. Casino de Casino del Sol - FilmFileEurope.com
    Casino 스포츠토토 언오버 벳피스트 놀검소 de Casino del 파워볼 구간분석 벳무브 Sol, CA - Casino de Casino del Sol is an exciting blend of 에볼루션 the beautiful landscapes and the natural beauty 승인전화없는 토토사이트 of 강원 랜드 썰 nature in our locale.

    BalasHapus