Record.. nilai mahasiswa

program niali_mhs;

uses wincrt;

const  MAX = 100;
 type
   Tsiswa = record
         NIM  : string[8];
         Nama : string[25];
         mkul : string [20];
         Nilai: array [1..3] of real;
 end;
Tkumpulsiswa= array [1..max] of Tsiswa;
var
  A:Tkumpulsiswa;
  i,N,no : integer;
  NA: real;
  begin
    write(‘Masukkan jumlah siswa yang akan di sisikan:’);readln(n);
    writeln;

  {memasukan data}
 GOTOXY(30,WHEREY); WRITELN(‘__________________________________’);
  GOTOXY(35,WHEREY);writeln(‘MASUKAN DATA SISWA’);
  GOTOXY(30,WHEREY);writeln(‘__________________________________’);
  for i:= 1 to N do
  begin
      writeln(‘Data Siswa Ke-‘,i);
      writeln;
      with A[i] do
         begin
           write(‘No            :’);readln(no);
           write(‘Nim           :’);readln(nim);
           write(‘Nama          :’);readln(nama);
           write(‘mkul          :’);readln(mkul);
           writeln(‘——Isi Nilasi Siswa——‘);
           write(‘ Nilai ke-1 (kuis) :’);readln(nilai[1]);
           write(‘ Niali ke-2 (UTS)  :’);readln(nilai[2]);
           write(‘ nilai ke-3 (UAS)  :’);readln(nilai[3]);
           write(‘——————————‘);
           writeln;writeln;
         end;
      writeln;
  end;
  begin
  clrscr;
  {menampilkan data}
  writeln(‘DAFTAR NILAI MAHASISWA PUTRA BATAM’);
  writeln(‘______________________________________________________________________________’);
  WRITELN(‘nim’:8,”:2, ‘nama’:25,”:2,’nilai’);
  Writeln(‘______________________________________________________________________________’);
  for i:= 1 to n do
   begin
     with A[i] do
        NA:= (0.2*nilai[1])+(0.3*nilai[2])+(0.5*nilai[3]);
        write(NIM:8,”:2,nama:25,”:2,na:0:2);
   end;
  writeln;
end;
readln;
end.

One thought on “Record.. nilai mahasiswa

  1. pak Satya yang baik dan Guuuuuanteng minta anti virusnya dong …..tar kalo d kampus gak ketemu
    kirimin ya PAK ,.,.,.,.,
    TANK BUAAANYAXXXXXXX

    oke…sama sama

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s