Program A;
Uses crt;
Var
npm : array [1..10] of string[10];
nama: array [1..20] of string[25];
nilai : array [1..20] of real;
umur : array [1..20] 0f byte;
banyak, i : integer;
begin
clrscr;
Write (‘jumlah data:’);
readln(banyak);
for i := 1 to banyak do begin
write(‘npm=’);
readln (npm[i]);
write(‘nama=’);
readln (nama[i]);
write(‘nilai=’);
readln (nilai[i]);
write(‘umur=’);
readln (umur[i]);
end;
writeln(‘ npm nama nilai umur ‘);
for i:= 1 to banyak do begin
writeln(npm[i]:7,nama[i]:10,nilai[i]:8:2,’ ‘,umur[i]:3;
readln;
end;
end.
Tidak ada komentar:
Posting Komentar