" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
VAR
nil1,nil2 : ARRAY [1..10] OF 0..100;
npm : ARRAY [1..10] OF STRING[8];
nama : ARRAY [1..10] OF STRING[15];
n,i,bar : INTEGER;
jum : REAL;
tl : CHAR;
BEGIN
WRITE('MAU ISI BERAPA DATA :'); READLN(N);
FOR i:= 1 TO n DO
BEGIN
CLRSCR;
GOTOXY(30,4+1); WRITE('DATA KE-:',i:2);
GOTOXY(10,5+i); WRITE('NPM :'); READLN(NPM[i]);
GOTOXY(10,6+i); WRITE('NAMA :'); READLN(NAMA[i]);
GOTOXY(10,7+i); WRITE('NILAI 1 :'); READLN(NIL1[i]);
GOTOXY(10,8+i); WRITE('NILAI 2 :'); READLN(NIL2[i]);
END;
CLRSCR;
GOTOXY(5,4); WRITE(GARIS);
GOTOXY(5,5); WRITE('NO');
GOTOXY(9,5); WRITE('NPM');
GOTOXY(18,5); WRITE('NAMA');
GOTOXY(34,5); WRITE('NIL.1');
GOTOXY(41,5); WRITE('NIL.2');
GOTOXY(47,5); WRITE('RATA');
GOTOXY(54,5); WRITE('ABJAD');
GOTOXY(5,6); WRITE(GARIS);
bar:=7;
FOR i:= 1 TO n DO
BEGIN
jum:=(nil1[i]+nil2[i])/2;
IF jum>=90 THEN tl:='A'
ELSE IF jum>80 THEN tl:='B'
ELSE IF jum>60 then tl:='C'
ELSE IF jum 50 THEN tl:='D'
ELSE tl:='E';
GOTOXY(5,bar); WRITELN(i:2);
GOTOXY(9,bar); WRITELN(NPM[i]);
GOTOXY(18,bar); WRITELN(NAMA[i]);
GOTOXY(34,bar); WRITELN(NIL1[i]:4);
GOTOXY(41,bar); WRITELN(NIL2[i]:4);
GOTOXY(47,bar); WRITELN(jum:5:1);
GOTOXY(54,bar); WRITELN(tl);
bar:=bar+1;
END;
GOTOXY(5,bar+1);WRITELN(garis);READLN;
END.