Sabtu, 08 Desember 2012

Record

program contoh_record;
uses
 winCrt;
type mhs = record
 nim : string[12];
 nama: string[25];
end;
var
 data:array[1..2] of mhs;
 i:integer;
procedure bintang;
begin
 writeln('**********************');
end;
begin
 writeln('PROGRAM CONTOH RECORD');
 bintang;
 for i:= 1 to 2 do
 begin
  write('Masukkan NIM : ');readln(data[i].nim);
  write('Masukkan Nama: ');readln(data[i].nama);
  clrscr;
 end;
 writeln('RECORD MAHASISWA');
 bintang;
 for i:= 1 to 2 do
 begin
  writeln('NIM    : ',data[i].nim);
  writeln('Nama   : ',data[i].nama);
 end;
end.

Tidak ada komentar:

Posting Komentar

array data mahasiswa

program array_1Dimensi; uses  winCrt; var  nim,nm,smstr,mk,grade:array[1..4] of string;  nh,uts,uas:array[1..4] of integer;  na:array...