1: Program Array_dan_Record;
2: type dmhs=record
3: nrp:string[10];
4: nama:string[25];
5: alamat:string[50];
6: end;
7: var data:array[1..3] of dmhs;
8: i:integer;
9: begin
10: for i:=1 to 3 do
11: begin
12: write('nrp : ');readln(data[i].nrp);
13: write('nama : ');readln(data[i].nama);
14: write('alamat : ');readln(data[i].alamat);
15: end;
16: writeln;
17: writeln('Data ditampilkan');
18: for i:=1 to 3 do
19: begin
20: writeln('nrp : ', data[i].nrp);
21: writeln('nama : ', data[i].nama);
22: writeln('alamat : ', data[i].alamat);
23: end;
24: readln;
25: end.