uses wincrt;
var
NIM :STRING[7];
NAMA :STRING[7];
PS :STRING;
SMSTR :STRING;
MK :ARRAY[1..10] OF STRING;
NILAIA :ARRAY[1..10] OF BYTE;
NILAIH :ARRAY[1..10] OF STRING;
SKS :ARRAY[1..10] OF BYTE;
BOBOT :ARRAY[1..10] OF BYTE;
TOTALA :REAL;
TOTALS :REAL;
IP :REAL;
JSYDS :INTEGER;
I :INTEGER;
BEGIN
WRITE('INPUTKAN NIM: ') ;READLN(NIM);
WRITE('INPUTKAN NAMA: ') ;READLN(NAMA);
WRITE('INPUTKAN PROGRAM STUDY: ');READLN(PS);
WRITE('INPUTKAN SEMESTER: ') ;READLN(SMSTR);
WRITELN('============================================================================');
WRITE('BERAPA BANYAK DATA YANG DIBUTUHKAN: ');READLN(I);
FOR I := 1 TO I DO
BEGIN
WRITE('INPUTKAN MATA KULIAH: ') ;READLN(MK[I]);
WRITE('INPUTKAN JUMLAH SKS: ') ;READLN(SKS[I]);
WRITE('INPUTKAN NILAI ANGKA: ') ;READLN(NILAIA[I]);
WRITELN('============================================================================');
IF NILAIA[I] >= 4 THEN
BEGIN
NILAIH[I] := 'A';
BOBOT[I] := SKS[I]*NILAIA[I];
END
ELSE IF NILAIA[I] >=3 THEN
BEGIN
NILAIH[I] :='B';
BOBOT[I] :=SKS[I]*NILAIA[I];
END
ELSE IF NILAIA[I] >=2 THEN
BEGIN
NILAIH[I] :='C';
BOBOT[I] :=SKS[I]*NILAIA[I];
END
ELSE IF NILAIA[I] >=1 THEN
BEGIN
NILAIH[I] :='D';
BOBOT[I] :=SKS[I]*NILAIA[I];
END
ELSE
BEGIN
NILAIH[I] :='E';
BOBOT[I] :=SKS[I]*NILAIA[I];
END;
TOTALA := TOTALA + BOBOT[I];
TOTALS := TOTALS + SKS[I] ;
END;
WRITELN(' SEKOLAH TINGGI MANAJEMEN INFORMATIKA & KOMPUTER ');
WRITELN(' STMIK DUMAI ');
WRITELN('_________________________________________________________________________');
WRITELN('NIM : ',NIM);
WRITELN('NAMA : ',NAMA);
WRITELN('PROGRAM STUDI: ',PS);
WRITELN('SEMESTER : ',SMSTR);
WRITELN('===========================================================================');
WRITELN(' NO MATA KULIAH SKS NILAI BOBOT ');
FOR I := 1 TO I DO
BEGIN
WRITELN(I:3,MK[I]:20,SKS[I]:13,NILAIA[I]:13,NILAIH[I]:13);
END;
WRITELN('============================================================================');
WRITELN('TOTAL SKS ANDA: ',TOTALS:12:0);
WRITELN('TOTAL NILAI ANDA: ',TOTALA:12:0);
IP:= TOTALA/TOTALS;
WRITELN('IP ANDA ADALAH: ',IP:12:0);
IF IP <= 4 THEN
BEGIN
JSYDS := 12*2;
END
ELSE IF IP <=3 THEN
BEGIN
JSYDS :=10+11;
END
ELSE IF IP <=2 THEN
BEGIN
JSYDS :=9*2;
END
ELSE
BEGIN
JSYDS :=8*2;
END;
WRITELN('JUMLAH SKS MAK SMSTER Y.A.D : ',JSYDS);
END.
moga bermanfaat.........
Mantap gan..... sintaksnya OK + Work......
BalasHapus