Program mengkonversi nilai angka yang di dapat mahasiswa
kedalam nilai huruf, dengan konversi :
Nilai >= 86 : A
70 <= Nilai < 86 : B
60 <= Nilai < 70 : c
50 <= Nilai < 60 : D
Nilai < 50 : E
Berikut codingnya :
Program Nilai_Mahasiswa;
Uses wincrt;
Var
nim,nm,mk,kel,nh:string;
na:real;
Begin
writeln(' PROGRAM INPUT NILAI' );
writeln('===========================');
Write('Masukan Nama Mahasiswa : ');Readln(nm);
Write('Masukan NIM : ');Readln(nim);
Write('Masukan Mata kuliah : ');Readln(mk);
Write('Masukan Nilai : ');Readln(na);
clrscr;
writeln('===========================');
writeln(' PROGRAM NILAI MAHASISWA ');
writeln('===========================');
writeln;
Writeln('Nama Mahasiswa : ',nm);
Writeln('NIM : ',nim);
Writeln('Mata Kuliah : ',mk);
Writeln('Nilai Angka : ',na:2:0);
IF ((na >= 86) AND (na <= 100)) THEN
nh := 'A'
ELSE IF ((na >= 70) AND (na < 86)) THEN
nh := 'B'
ELSE IF ((na >= 60) AND (na < 70)) THEN
nh := 'C'
ELSE IF ((na >= 50) AND (na < 60)) THEN
nh := 'D'
ELSE
nh := 'E';
Writeln('Nilai Huruf : ',nh);
writeln;
writeln('===========================');
end.
Nilai >= 86 : A
70 <= Nilai < 86 : B
60 <= Nilai < 70 : c
50 <= Nilai < 60 : D
Nilai < 50 : E
Berikut codingnya :
Program Nilai_Mahasiswa;
Uses wincrt;
Var
nim,nm,mk,kel,nh:string;
na:real;
Begin
writeln(' PROGRAM INPUT NILAI' );
writeln('===========================');
Write('Masukan Nama Mahasiswa : ');Readln(nm);
Write('Masukan NIM : ');Readln(nim);
Write('Masukan Mata kuliah : ');Readln(mk);
Write('Masukan Nilai : ');Readln(na);
clrscr;
writeln('===========================');
writeln(' PROGRAM NILAI MAHASISWA ');
writeln('===========================');
writeln;
Writeln('Nama Mahasiswa : ',nm);
Writeln('NIM : ',nim);
Writeln('Mata Kuliah : ',mk);
Writeln('Nilai Angka : ',na:2:0);
IF ((na >= 86) AND (na <= 100)) THEN
nh := 'A'
ELSE IF ((na >= 70) AND (na < 86)) THEN
nh := 'B'
ELSE IF ((na >= 60) AND (na < 70)) THEN
nh := 'C'
ELSE IF ((na >= 50) AND (na < 60)) THEN
nh := 'D'
ELSE
nh := 'E';
Writeln('Nilai Huruf : ',nh);
writeln;
writeln('===========================');
end.