feri corps™. Diberdayakan oleh Blogger.

Labels

Algoritma | Program menghitung Nilai Akhir dan Grede

Rumus :
NA=25%*tugas+35%*UTS+40%*UAS

sedangkan sistem penilaian grade adalah
NA >=75               -Grade = A
60 <=NA < 75        -Grade = B
45 <=NA <60        -Grade = C
NA <45                -Grade = D

PROGRAM:

program NilaiAkhir;
uses wincrt;
var
nt,uts,uas,rt:real;
nim,nama,grade:string;
tr:longint;

begin
gotoxy (30,10);
   writeln(' Data Nilai Mahasiswa ');
gotoxy (24,11);
   writeln(' --------------------------------- ');
gotoxy (27,12);
   write('Nama  : ');readln(nama);
gotoxy (27,13);
   write('Tugas : ');readln(nt);
gotoxy (27,14);
   write('UTS   : ');readln(uts);
gotoxy (27,15);
   write('UAS   : ');readln(uas);
gotoxy (24,16);
   writeln(' --------------------------------- ');
rt:=0.25*nt+0.35*uts+0.40*uas;
tr:=round(rt);
case tr of
0..44:
begin
grade:='E';
end;
45..55:
begin
grade:='D';
end;
56..65:
begin
grade:='C';
end;
66..79:
begin
grade:='B';
end;
80..100:
begin
grade:='A';
end;
end;

clrscr;
gotoxy (30,10);
  writeln(' Nilai Akhir dan Grade ');
gotoxy (24,11);
  writeln(' -------------------------------- ');
gotoxy (27,12);
  writeln(' Nama        : ',nama);
gotoxy (27,13);
  writeln(' Nilai Akhir : ',rt:4:0);
gotoxy (27,14);
  writeln(' Grade       : ',grade);
gotoxy (24,15);
writeln(' --------------------------------- ');
readln;
end.

HASIL SCREEN:




0 komentar

Posting Komentar