Wednesday, April 30, 2014

praktikum (nilai)

program P0303;
uses wincrt;
var tugas,uts,uas:integer; nama, alamat:string; nim:byte;
    akhir:real; grade:char;
begin
gotoxy(23,1);writeln('Tugas Praktikum oleh');
gotoxy(23,2);writeln('Nama  : Rufita Sari');
gotoxy(23,3);writeln('NIM   : 111210293');
gotoxy(23,4);writeln('Kelas : G');
gotoxy(23,5);writeln('====================');
writeln;
write('Masukkan Nama Mahasiswa: '); readln(nama);
write('Masukkan Alamat: '); readln(alamat);
write('Masukkan NIM: '); readln(nim);
write('Nilai Tugas: '); readln(tugas);
write('Nilai UTS: '); readln(uts);
write('Nilai UAS: '); readln(uas);
writeln;
akhir:=(2*uas+tugas+uts)/4;

begin
if(akhir>=80)then
grade:='A'
else
if(akhir>=70)then
grade:='B'
else
if(akhir>=60)then
grade:='C'
else
grade:='D';
end;

writeln('Data Mahasiswa');
writeln('--------------');
writeln('Nama        : ',nama)  ;
writeln('Alamat      : ',alamat) ;
writeln('NIM         : ',nim);
writeln;
writeln('Nilai Akhir : ',akhir:2:0);
writeln('Grade       : ',grade);
begin
if grade='A' then write('keterangan  : lulus');
if grade='B' then write('keterangan  : lulus');
if grade='C' then write('keterangan  : lulus');
if grade='D' then write('keterangan  : tidak lulus');
end;
end.

No comments:

Post a Comment