uses
wincrt;
var
nama : string;
uts,uas,prak : integer;
uts1,uas1,prak1 : integer;
total : real;
begin
writeln('NILAI AKHIR MAHASISWA STT DHARMA ISAWARA');
write('Nama : '); readln(nama);
write('Uts : '); readln(uts);
write('Uas : '); readln(uas);
write('Praktikum : '); readln(prak);
writeln;
total :=((20 / 100)*uts)+((30 / 100)*uas)+((50 / 100)*prak);
writeln('Hasil akhir nilai mahasiswa adalah ?');
writeln('Nama : ',nama);
write('Nilai Angka : '); writeln(total:2:0);
write('Nilai Huruf : '); case round(total) of
0..40 : writeln('E');
41..54 : writeln('D');
55..74 : writeln('C');
75..84 : writeln('B');
else
writeln('A');
end;
write('Reward : '); case round(total) of
85..100 : writeln('BEBAS SPP 1 TAHUN PENUH');
75..84 : writeln('BEBAS SPP 1 SEMESSTER');
55..74 : writeln('TERIMA KASIH');
0..54 : writeln('ANDA PERLU BELAJAR LEBIH GIAT LAGI!');
end;
end.
0 komentar:
Posting Komentar