program array_2

program array_02;

uses wincrt;

var nim:array[1..20] of string[10];

no:array[1..20] of integer;

nama:array[1..20] of string[25];

nilai:array[1..20] of integer;

i,n:integer;

begin

write(‘masukkan data yang diperlukan =’ );read(n);

clrscr;

for i:=1 to n do

begin

write(‘NO = ‘);readln(no[i]);

write(‘NIM = ‘); readln(nim[i]);

write(‘NAMA = ‘); readln(nama[i]);

write(‘NILAI = ‘); readln(nilai[i]);

clrscr;

end;

gotoxy(25,1);write(‘DAFTAR NILAI MAHASISWA’);

gotoxy(30,2);writeln(‘SEMESTER III’);

writeln;

writeln(‘===============================================================’);

writeln(‘| NO      |       NIM         |     NAMA         |      NILAI |’);

writeln(‘===============================================================’);

for i:=1 to n do

begin

writeln(no[i]:4,nim[i]:17,nama[i]:19,nilai[i]:21);

end;

readln;

end.

Iklan

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 )

Foto Google+

You are commenting using your Google+ 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 )

Connecting to %s

%d blogger menyukai ini: