program modul5;
uses crt;
var
a :
Pointer;
b : ^Byte;
c : array
[0..100] of Byte;
i : Byte;
n :
integer;
begin
clrscr;
writeln('
');
write('
Masukkan jumlah data : '); readln(n);
writeln;
writeln;
GetMem(a,
20);
b := a;
for i := 0
to n do
begin
c[i] := n -
i;
b^ := n -
i;
inc(b);
end;
b := a;
for i := 0
to n do
begin
write(' c[
', i ,' ] = ', c[i], '; ');
writeln('
a^ ke-', i ,' = ', b^);
inc(b);
end;
readln;
end.
Tidak ada komentar:
Posting Komentar