Program 3

uses crt;
type
                  mahasiswa = record
                    nim                 : integer;
                    nama                : string [15];
                    jtm,tm,tt,mid,nus   : real;
                    end;
var
   filemahasiswa        : file of mahasiswa;
   recordmahasiswa      : mahasiswa;

begin
assign(filemahasiswa,'mhs.dat');
reset(filemahasiswa);

clrscr;
writeln('--------------------------------------------------------------------------------------------------');
writeln('nim                                                                                               ');
writeln('mhs.  nama mahasiswa   tatap muka   tugas mandiri   tugas terstruktur   mid   nilai ujian semester');
writeln('--------------------------------------------------------------------------------------------------');

while not eof(filemahasiswa) do
begin
read(filemahasiswa, recordmahasiswa);
with recordmahasiswa do
writeln(nim:5,nama:17,tm,tm,tt,mid,nus:10:2);
end;
writeln('--------------------------------------------------------------------------------------------------');
readln;
close(filemahasiswa);
end.

Tidak ada komentar:

Posting Komentar

Thk's 4 u'r coment.

Populer