berikut screenshotnya :
dan in adalah source code nya :
program Program_Menghitung_Nilai_Mahasiswa;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
n1,n2,n3 : real;
nama,prodi,npm,huruf,komentar,ket : string;
total,rata : real;
begin
writeln ('------------------------');
writeln ('PROGRAM MENGHITUNG NILAI');
writeln ('========================');
write ('MASUKKAN NAMA :'); readln (nama);
write ('MASUKKAN NPM :'); readln (npm);
write ('MASUKKAN PRODI:'); readln (prodi);
write ('MASUKKAN NILAI TUGAS :'); readln (n1);
write ('MASUKKAN NILAI UTS :'); readln (n2);
write ('MASUKKAN NILAI UAS :'); readln (n3);
total := n1+n2+n3;
rata := total/3;
if rata>=84 then
begin
huruf := 'A';
komentar := 'SANGAT BAIK';
ket :='LULUS';
end
else
if rata>=60 then
begin
huruf :='B';
komentar :='BAIK';
ket :='LULUS';
end
else
if rata>=50 then
begin
huruf :='D';
komentar :='KURANG';
ket :='TIDAK LULUS';
end
else
if rata>=49 then
begin
huruf :='E';
komentar :='SANGAT KURANG';
ket :='TIDAK LULUS';
end;
writeln ('---------------------------');
writeln ('OUTPUT DATA NILAI MAHASISWA');
writeln ('===========================');
writeln ('nama mahsiswa :',nama);
writeln ('npm :',npm);
writeln ('prodi :',prodi);
writeln ('------KOMPONEN NILAI-------');
writeln ('niali tugas :',n1:4:2);
writeln ('niali uts :',n2:4:2);
writeln ('niali uas :',n3:4:2);
writeln ('---------------------------+');
writeln ('TOTAL NILAI :',total:4:2);
writeln ('TOTAL ANGKA :',rata:4:2);
writeln ('TOTAL HURUF :',huruf);
writeln ('PREDIKAT :',komentar);
writeln ('KETERANGAN :',ket);
readln;
end.
{$APPTYPE CONSOLE}
uses
SysUtils;
var
n1,n2,n3 : real;
nama,prodi,npm,huruf,komentar,ket : string;
total,rata : real;
begin
writeln ('------------------------');
writeln ('PROGRAM MENGHITUNG NILAI');
writeln ('========================');
write ('MASUKKAN NAMA :'); readln (nama);
write ('MASUKKAN NPM :'); readln (npm);
write ('MASUKKAN PRODI:'); readln (prodi);
write ('MASUKKAN NILAI TUGAS :'); readln (n1);
write ('MASUKKAN NILAI UTS :'); readln (n2);
write ('MASUKKAN NILAI UAS :'); readln (n3);
total := n1+n2+n3;
rata := total/3;
if rata>=84 then
begin
huruf := 'A';
komentar := 'SANGAT BAIK';
ket :='LULUS';
end
else
if rata>=60 then
begin
huruf :='B';
komentar :='BAIK';
ket :='LULUS';
end
else
if rata>=50 then
begin
huruf :='D';
komentar :='KURANG';
ket :='TIDAK LULUS';
end
else
if rata>=49 then
begin
huruf :='E';
komentar :='SANGAT KURANG';
ket :='TIDAK LULUS';
end;
writeln ('---------------------------');
writeln ('OUTPUT DATA NILAI MAHASISWA');
writeln ('===========================');
writeln ('nama mahsiswa :',nama);
writeln ('npm :',npm);
writeln ('prodi :',prodi);
writeln ('------KOMPONEN NILAI-------');
writeln ('niali tugas :',n1:4:2);
writeln ('niali uts :',n2:4:2);
writeln ('niali uas :',n3:4:2);
writeln ('---------------------------+');
writeln ('TOTAL NILAI :',total:4:2);
writeln ('TOTAL ANGKA :',rata:4:2);
writeln ('TOTAL HURUF :',huruf);
writeln ('PREDIKAT :',komentar);
writeln ('KETERANGAN :',ket);
readln;
end.
0 Response to "Program Hitung Nilai Dari DELPHI 7"
Post a Comment