Program 2

uses crt;
type
                  mahasiswa = record
                    nim                 : integer;
                    nama                : string [15];
                    jtm,tm,tt,mid,nus   : real;
                    end;
var
   filemahasiswa        : file of mahasiswa;
   recordmahasiswa      : mahasiswa;
   lagi                 : char;
begin
assign(filemahasiswa,'mhs.dat');
reset(filemahasiswa);
if IOresult <> 0 then rewrite(filemahasiswa);
seek(filemahasiswa,filesize(filemahasiswa));
lagi :='Y';
while upcase(lagi)='Y' do
begin
clrscr;
with recordmahasiswa do
begin
writeln('      ---------------------------------------------------------------------');
writeln('      -----------           PROGRAM BY : PASKAL HUTAPEA           ---------');
writeln('      ---------------------------------------------------------------------');
READ;
     gotoxy(5,6); writeln('Nim Mahasiswa        :');
     gotoxy(5,8); writeln('Nama Mahasiswa       :');
     gotoxy(5,10);writeln('Jumlah Tatap Muka    :');
     gotoxy(5,12);writeln('Tugas Mandiri        :');
     gotoxy(5,14);writeln('Tugas Terstruktur    :');
     gotoxy(5,16);writeln('Nilai Mid            :');
     gotoxy(5,18);writeln('Nilai Ujian Semester :');

     gotoxy(27,6);    readln(nim);
     gotoxy(27,8);    readln(nama);
     gotoxy(27,10);   readln(jtm);
     gotoxy(27,12);   readln(tm);
     gotoxy(27,14);   readln(tt);
     gotoxy(27,16);   readln(mid);
     gotoxy(27,18);   readln(nus);
     end;
write(filemahasiswa, recordmahasiswa);

gotoxy(10,21);write('masukkan data lagi (Y/T) ?'); readln(lagi);
end;
close(filemahasiswa);
end.

Tidak ada komentar:

Posting Komentar

Thk's 4 u'r coment.

Populer