Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

TUGAS TEKNOLOGI INFORMASI DAN PEMROGAMAN

Dibuat Oleh : Dimas Sukron Zulkarnain

NPM : 17010025

Kelas : 1T2

POLITEKNIK STTT BANDUNG

2017
Program Menentukan_Grade_Sebuah_Nilai;
uses crt;
var
Nilai : real;
Grade : char;
begin
write('Nilai : ');readln(Nilai);
if (Nilai > 100)
then
begin
gotoxy(1,2);
write('Nilai angka tidak boleh melebihi angka 100 !');
readln;gotoxy(1,2);clreol;
gotoxy(9,1);clreol;
gotoxy(9,1);readln(Nilai);
end
else
if (Nilai >= 90) and (Nilai <=100)
then
Grade := 'A'
else
if (Nilai >= 80) and (Nilai < 90)
then
Grade := 'AB'
else
if (Nilai >= 70) and (Nilai < 80)
then
Grade := 'B'
else
if (Nilai >= 60) and (Nilai < 70)
then
Grade := 'BC'
else
if (Nilai >= 50) and (Nilai < 60)
then
Grade := 'C'
else
if (Nilai >= 40) and (Nilai < 50)
then
Grade := 'CD'
else
if (Nilai >= 30) and (Nilai < 40)
then
Grade := 'D'
else
if (Nilai >= 20) and (Nilai < 30)
then
Grade := 'DE'
if (Nilai >= 0) and (Nilai < 20)
then
Grade := 'E'
write('Grade : ',Grade);
readln;
end.

You might also like