uses wincrt;
type id_mhs= record
nim,nama:string;
end;
var
id : array [1..10] of id_mhs;
i,j,a,n:integer;
temp_cari:string;
begin
i:=0;
repeat
inc(i);
write('masukkan banyak data:');readln(n);
until (i >=3) or (n > 1);
for j := 1 to n do
begin
write('nim:');readln(id[j].nim);
write('nama:');readln(id[j].nama);
end;
clrscr;
begin
write('masukkan nim:');readln(temp_cari);
A:= 0;
repeat
inc(a);
until (i >= n) or (id[i].nim = temp_cari);
if (id[i].nim = temp_cari) then
writeln('nama:',id[i].nama)
else
writeln('tidak ditemukan');
readln;
donewincrt;
end;
end.
skip to main |
skip to sidebar
--
My Clock
Link Situ Kesukaan
Archives
About Me
Followers
Pengunjung Online
Shoutmix
Trafik
-
-
Editing by uliantony.co.cc
2 komentar: tugas kuliah algoritma_pencarian
April 14, 2009 at 12:44 AM
April 14, 2009 at 12:44 AM
Post a Comment