program data;
type
dmhs = ^rmhs;
rmhs = record
nama,nim,jur: string;
end;
var
mhs: array [1..5] of rmhs;
n,i : integer;
begin
write ('masukkan banyak data:');
readln (n);
writeln;
for i := 1 to n do
begin
write ('masukkan nama ke- ',i,':');
readln (mhs[i].nama);
write ('masukkan nim ke- ',i,':');
readln (mhs[i].nim);
write ('masukkan jurusan ke- ',i,':');
readln (mhs[i].jur);
writeln;
end;
for i := 1 to n do
begin
writeln ('nama ke-',i,':',mhs[i].nama);
writeln ('nim ke-',i,':',mhs[i].nim);
writeln ('jurusan ke-',i,':',mhs[i].jur);
writeln;
end;
end.
type
dmhs = ^rmhs;
rmhs = record
nama,nim,jur: string;
end;
var
mhs: array [1..5] of rmhs;
n,i : integer;
begin
write ('masukkan banyak data:');
readln (n);
writeln;
for i := 1 to n do
begin
write ('masukkan nama ke- ',i,':');
readln (mhs[i].nama);
write ('masukkan nim ke- ',i,':');
readln (mhs[i].nim);
write ('masukkan jurusan ke- ',i,':');
readln (mhs[i].jur);
writeln;
end;
for i := 1 to n do
begin
writeln ('nama ke-',i,':',mhs[i].nama);
writeln ('nim ke-',i,':',mhs[i].nim);
writeln ('jurusan ke-',i,':',mhs[i].jur);
writeln;
end;
end.
0 comments:
Posting Komentar