uses crt;
type
mahasiswa = record
nim : string;
nama : string;
alamat : string;
ipk : real;
end;
var datamahasiswa : array [1..100] of mahasiswa;
a,b: integer;
begin
write('masukkan batas data yang di inputkan : ');
readln(a);
for b:=1 to a do
begin
clrscr;
with datamahasiswa[b] do
Begin
write('masukkan NIM mahasiswa : ');
readln(NIM);
write('masukkan nama mahasiswa : ');
readln(nama);
write('masukkan alamat : ');
readln(alamat);
write('masukkan ipk : ');
readln(ipk);
end;
end;
writeln('nim':5,'nama':25,'alamat':30,'ipk':6);
for b:=1 to a do
begin
with datamahasiswa[b] do
Begin
write(nim:5);
write(nama:25);
write(alamat:30);
write(ipk:6:2);
end;
writeln;
end;
readln;
end.
No comments:
Post a Comment