var x : integer;
nm,ket : array[1..10] of string;
md,fn,rt : array[1..10] of real;
const grs = '-------------------------------------------------------------------';
procedure input;
var i : integer;
begin
clrscr;
write('Jumlah data : '); readln(x);
clrscr;
for i := 1 to x do
begin
write('Data ke ',i); writeln;
write('Nama : '); readln(nm[i]);
write('Midtest : '); readln(md[i]);
write('Finaltest : '); readln(fn[i]);
clrscr;
end;
end;
procedure proses;
var i : integer;
begin
for i := 1 to x do
begin
rt[i] := (0.4*md[i]) + (0.6*fn[i]);
if rt[i] >= 70 then ket[i] := 'Baik';
if (rt[i] > 60) and (rt[i] < 70 ) then ket[i] := 'Cukup';
if rt[i] < 60 then ket[i] := 'Gagal';
end;
end;
procedure cetak;
var i : integer;
begin
clrscr;
writeln('Daftar Nilai Mahasiswa');
writeln(grs);
writeln(' No Nama Midtest Finaltest Rata-rata Keterangan');
writeln(grs);
for i := 1 to x do
begin
gotoxy(1,4+i); write(i:2,'.');
gotoxy(6,4+i); write(nm[i]);
gotoxy(23,4+i); write(md[i]:3:0);
gotoxy(36,4+i); write(fn[i]:3:0);
gotoxy(49,4+i); write(rt[i]:3:0);
gotoxy(58,4+i); write(ket[i]);
end;
end;
begin
input;
proses;
cetak;
writeln;
writeln(grs);
readln;
end.
uses crt;
var x : integer;
nm,ket : array[1..10] of string;
md,fn,rt : array[1..10] of real;
const grs = '-------------------------------------------------------------------';
procedure input;
var i : integer;
begin
clrscr;
write('Jumla
gambar 1 |
gambar 2 |
gambar 3 |
gambar 3 |
Tidak ada komentar:
Posting Komentar