PROGRAM UINPUT NILAI MAHASISWA
uses crt;
label
ulangi,selesai;
procedure kop;
begin
textbackground(0);
textcolor(yellow);
gotoxy(7,1);writeln('NAMA = LUKMANUL
HAKIM');
gotoxy(7,2);writeln('NIM/KLS = 11012356
/ J');
gotoxy(7,3);writeln('DOSEN PEMBIMBING =
EKO PURNOMO,S.Kom.');
textbackground(green);
textcolor(yellow);
gotoxy(13,5);writeln('***************
DATA INPUTAN NILAI ***************');
gotoxy(13,6);writeln('**************
UJIAN AKHIR SEMESTER **************');
gotoxy(13,7);writeln('*****************
STT NURUL JADID ****************');
end;
var
a,jml:longint;
U:string;
nim:array [1..10] of string;
jum:array[1..10] of longint;
rat:array[1..10] of real;
nama,ket:array [1..25] of string;
mtk,bhs,pas:array [1..10] of
longint;
begin
clrscr;
ulangi:
kop;
textbackground(0);
writeln;
write('MASUKKAN JUMLAH INPUTAN = ');
readln(jml);
for a:=1 to jml do
begin
clrscr;
textcolor(yellow);
writeln('NO ',a);
write('NIM = ');readln(nim[a]);
write('NAMA = ');readln(nama[a]);
write('MTK = ');readln(mtk[a]);
write('BHS = ');readln(bhs[a]);
write('PAS = ');readln(pas[a]);
jum[a]:=mtk[a]+ bhs[a]+ pas[a];
rat[a]:=jum[a]/3;
writeln;
end;
for a:= 1 to jml do
begin
clrscr;
end;
for a:= 1 to jml do
begin
clrscr;
kop;
textbackground(0);
textcolor(white);
gotoxy(3,10);writeln('+====+===========+==============+=====+=====+=====+=====+======+=====+');
gotoxy(3,11);writeln('| NO | NIM
| NAMA | MTK | BHS | PAS | JML | RATA | KET |');
gotoxy(3,12);writeln('+----+-----------+--------------+-----+-----+-----+-----+------+-----+');
end;
for a:= 1 to jml do
begin
kop;
textbackground(0);
textcolor(white);
gotoxy(3,a+12);write('| ',a);
gotoxy(8,a+12);write('| ',nim[a]);
gotoxy(20,a+12);write('|
',nama[a]);
gotoxy(35,a+12);write('| ',mtk[a]);
gotoxy(41,a+12);write('| ',bhs[a]);
gotoxy(47,a+12);write('| ',pas[a]);
gotoxy(53,a+12);write('| ',jum[a]);
gotoxy(59,a+12);write('|
',rat[a]:0:0);
if (rat[a]>89) and
(rat[a]<101) then
begin
gotoxy(66,a+12); write('| A');
end
else
if (rat[a]>74) and (rat[a]<90)
then
begin
gotoxy(66,a+12);write('| B');
end
else
if (rat[a]>59) and (rat[a]<75)
then
begin
gotoxy(66,a+12);write('| C');
end
else
if (rat[a]<60) then
begin
gotoxy(66,a+12);write('| D');
end;
gotoxy(72,a+12);write('|');
end;
gotoxy(3,13+a);writeln('======================================================================');
writeln;
write('INGIN MENGULANGI Y/T ? ');readln(U);
if (U='y') OR (U='Y') then
begin
goto ulangi;
end
else
begin
goto selesai;
end;
readln;
selesai:
end.
END.
0 komentar:
Posting Komentar