program arrayD2;
uses crt;
var
data : array [1..10,1..10] of integer;
n,i,j,x : integer;
begin
clrscr;
write('masukkan jumlah baris yg ingin diinput :');
readln(n);
write('masukkan jumlah kolom yg ingin diinput :');
readln(x);
writeln;
writeln('memasukkan data ke array');
for i := 1 to n do
for j := 1 to x do
begin
write('data ke [',i,',',j,']:');
readln(data [i][j]);
end;
writeln;
writeln('menampilkan isi array');
for i := 1 to n do
begin
for j :=1 to x do
write(data[i][j]:4);
writeln;
writeln;
end;
readln;
end.
OUTPUT :
uses crt;
var
data : array [1..10,1..10] of integer;
n,i,j,x : integer;
begin
clrscr;
write('masukkan jumlah baris yg ingin diinput :');
readln(n);
write('masukkan jumlah kolom yg ingin diinput :');
readln(x);
writeln;
writeln('memasukkan data ke array');
for i := 1 to n do
for j := 1 to x do
begin
write('data ke [',i,',',j,']:');
readln(data [i][j]);
end;
writeln;
writeln('menampilkan isi array');
for i := 1 to n do
begin
for j :=1 to x do
write(data[i][j]:4);
writeln;
writeln;
end;
readln;
end.
OUTPUT :
good jobz ..
ReplyDelete