1 / 8

LARIK

LARIK. 1. start. For I := 1 to 7. For I := 1 to 7. Cetak nama. Input nama. next. next. end. 1. Ilustrasi. Nama : String. Ari Lisa Hadi Kamil Yadi Ridha Muli. Muli Muli Muli Muli Muli Muli Muli. Array / Larik. Struktur data yang menyimpan sekumpulan elemen yang bertipe sama

milica
Download Presentation

LARIK

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LARIK

  2. 1 start For I := 1 to 7 For I := 1 to 7 Cetak nama Input nama next next end 1 Ilustrasi Nama : String Ari Lisa Hadi Kamil Yadi Ridha Muli Muli Muli Muli Muli Muli Muli Muli

  3. Array / Larik • Struktur data yang menyimpan sekumpulan elemen yang bertipe sama • Setiap elemen diakses langsung melalui indeksnya.

  4. 1 start For I := 1 to 7 For i := 1 to 7 Cetak nama[i] Input nama[i] next next end 1 Nama : 1 2 3 4 5 6 7 Nama[1] Nama[2] Nama[3] Nama[4] Nama[5] Nama[6] Nama[7] Ari Lisa Hadi Kamil Yadi Ridha Muli Ari Lisa Hadi Kamil Yadi Ridha Muli

  5. MenginputkanLarik Nama[1] = “Ari”; Nama[2] = “Lisa”;

  6. MengaksesLarik • Cetak Nama[1]; • Jika Nilai[2] > 80 maka Grade[2] = “A”;

  7. Contoh Kasus • Menghitung hasil perhitungan suara. • Menghitung nilai rata-rata. • Menghitung grade nilai 40 orang anak. • Mencari nilai yang paling tinggi dari 40 anak.

  8. Matrix ilustration [0] [1] [2] [3] [4] [0] [1] [2] [3] [0] [1] [2] [0] [1] [2] [3] [4] [0] [1] [2] [3] [4] [0] [1] [2] matrix[2][1]=7

More Related