1 / 13

ARRAY PADA PASCAL

ARRAY PADA PASCAL. DOSEN : NURAINI PURWANDARI. program konstanta_larik; uses crt; Const X : array [1..5] of integer = (6, 25, 375, 5, 2) ; Var I : word ; Begin clrscr; For I : = 1 to 5 do Writeln ( 'Nilai konstanta larik ke ', I, '=', X[I] ) ; End. Program char_larik; Uses crt;

Download Presentation

ARRAY PADA PASCAL

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. ARRAY PADA PASCAL DOSEN : NURAINI PURWANDARI

  2. program konstanta_larik; uses crt; Const X : array [1..5] of integer = (6, 25, 375, 5, 2) ; Var I : word ; Begin clrscr; For I : = 1 to 5 do Writeln ( 'Nilai konstanta larik ke ', I, '=', X[I] ) ; End.

  3. Program char_larik; Uses crt; Var I : word ; Nama : string [255] ; Begin Clrscr; Write ( ‘Nama Anda ?’ ) ; readln ( Nama ) ; Writeln ; Writeln ( ‘Nama Anda kalau dibaca terbalik adalah : ‘ ) ; For I : = ord (Nama [0] ) down to 1 do Write (Nama [I] ) ; End.

  4. program array_multi; uses crt; Var Tabel : array [1..3, 1..2] of byte ; I, J : byte ; Begin clrscr; Tabel[1,1] := 5 ; Tabel[1,2] := 25 ; Tabel[2,1] := 200 ; Tabel[2,2] := 22 ; Tabel[3,1] := 75 ; Tabel[3,2] := 50 ; For I := 1 to 3 do Begin For J := 1 to 2 do Write ( Tabel [I,J] : 10 ) ; Writeln ; End ; readkey; End.

  5. -SEKIAN- TERIMA KASIH

More Related