Array

Harus dikuasai :

  • deklarasi array 1 dimensi :
nama_array: array [batas_bawah..batas_atas] of tipe_data;
ar : array[0..100,0..100] of integer;
  • deklarasi array 2 dimensi :
nama_array : array[batas_bawah1..batas_atas1,batas_bawah2..batas_atas2] of tipe_data;
ar: array[0..100,0..100] of integer;
  • inisialisasi matriks:
fillchar(ar,sizeof(ar),0);
  • membaca matriks 2 dimensi:
for i := 1 to baris do begin
for j := 1 to kolom do begin
read(ar[i,j]);
end;
readln;
end;

Latihan Contest :

Latihan Online Judge:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: