program khs;
uses wincrt;
var
i,n,jum:integer;
nim :string[8];
nama :string[25];
matakul:array[1..10] of string[25];
kode :array[1..10] of string[7];
sks :array[1..10] of integer;
begin
write('masukan nim :');readln(nim);
write('masukan nama :');readln(nama);
write('masukan n matakul:');readln(n);
for i:=1 to n do
begin
write('Matakul ke-',i,':');readln(matakul[i]);
write('Kode :');readln(kode[i]);
write('Sks :');readln(sks[i]);
jum:=jum+sks[i];
end;
writeln(' ');
writeln(' Kartu Hasil Study (KHS) ');
writeln(' ');
writeln('Nomhs / Nama Mahasiswa :');
writeln( nim,' / ',nama);
writeln('-----------------------------------------------------');
writeln(' No | Kode | MataKul | Sks ');
writeln('-----------------------------------------------------');
for i:= 1 to n do
writeln( i:5,' |',kode[i]:6,' |',matakul[i]:9,' ','|',sks[i]:5);
writeln('-----------------------------------------------------');
writeln(' Total Sks :',jum);
writeln('-----------------------------------------------------');
readln;
end.
Tidak ada komentar:
Posting Komentar