Related Posts with Thumbnails
Home » , » LAB Agoritma Nilai Akhir, Grade

LAB Agoritma Nilai Akhir, Grade

Written By ex genvil on Minggu, 19 Desember 2010 | 02.32

program mahasiswa;
uses crt;
npm,nama,jur,ket:string;
uas,uts,prktk:integer;
gr:char;
begin
clrscr;
write('Tulis NPM' : ');readln(npm);

write('Tulis Nama' : ');readln(nama);
jur:=copy(npm,1,1);
if (jur='1') then jur:='S1-Si';
if (jur='2') then jur:='S1-Sk';
if (jur='3') then jur:='D3-Mi';
if (jur='4') then jur:='D3-Tk';
writeln('Jurusan : ',jur);
write('Nilai UTS'       : ');readln(uts);
write('Nilai UAS'      : ');readln(uas);
write('Nilai Praktek'  : ');readln(prktk);
akhir:=(0.3*uts)+(0.3*uas)+(0.4*prktk);
writeln('Nilai akhir : ',akhir:3:1);
begin
if (akhir>=85) then
gr:='A';
ket:='LULUS';
end;
if (akhir>=75) then
begin
gr:='B';
ket:='LULUS';
end;
if (akhir>=60) then
begin
gr:='C';
ket:='LULUS';
end;
if (akhir>=45) then
begin
gr:='D';
ket:='LULUS';
end;

if (akhir<45) then
begin

gr:='E';
ket:='TIDAK LULUS';
end;
writeln('Grade anda : ',gr);
writeln('Keterangan : ',ket);
readln;
end.
Share this article :

Tidak ada komentar:

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. kamar loteng - All Rights Reserved
Template Created by Creating Website
Proudly powered by Blogger