Source Code Program Menghitung Nilai Mahasiswa dalam Pascal
program menghitung_nilai_mahasiswa;
uses wincrt;
var
nama,grade,ket : string;
nilai,absen,tm,uts,uas : integer;
begin
writeln('PROGRAM MENGHITUNG NILAI MAHASISWA');
writeln('==================================');
writeln;
write('Masukan Nama Mahasiswa : ');readln(nama);
writeln('=======================');
writeln;
writeln('Masukan Nilai Mahasiswa');
writeln('=======================');
write('Nilai Absensi : ');readln(absen);
write('Nilai Tugas Mandiri : ');readln(tm);
write('Nilai UTS : ');readln(uts);
write('Nilai UAS : ');readln(uas);
nilai := (10*absen + 15*tm + 25*uts + 50*uas) div 100;
if nilai > 85 then
grade:= 'A'
else
if (nilai > 75) and (nilai < 85) then
grade:= 'B'
else
if (nilai > 65) and (nilai < 75) then
grade:= 'C'
else
if (nilai > 50) and (nilai < 65) then
grade:= 'D'
else
if (nilai > 0) and (nilai < 50) then
grade:= 'E'
else
grade:= 'F';
case nilai of
85..100 : ket:=('LULUS MEMUASKAN');
75..84 : ket:=('LULUS BAIK');
65..74 : ket:=('LULUS CUKUP');
else
ket:=('TIDAK LULUS');
end;
writeln;
writeln('MAKA HASILNYA ADALAH :');
writeln('======================');
writeln('Hasil nilai akhir ' ,nama, ' adalah ' ,nilai);
writeln('Grade yang didapat adalah ' ,grade, ' maka anda dinyatakan ' ,ket);
writeln;
writeln('==========EDITED BY : Arlicious==========');
writeln('=========================================');
writeln('TERIMAKASIH TELAH MENGGUNAKAN PROGRAM INI');
readln;
end.
This is dummy text. It is not meant to be read. Accordingly, it is difficult to figure out when to end it. But then, this is dummy text. It is not meant to be read. Period.