Monday, March 26, 2012

Program Case 2


program nilai;
uses crt;
var nim,nama,nh,pred,ket:string;
na:integer;
begin
        clrscr;
        write('masukkan nim: ');
        readln(nim);
        write('masukkan nama: ');
        readln(nama);
        write('nilai akhir: ');
        readln(na);
case na of
00..30: begin
         nh:='e';
         pred:='buruk';
         end;
31..55: begin
         nh:='d';
         pred:='kurang';
         end;
56..66: begin
         nh:='c';
         pred:='cukup';
         end;
67..80: begin
         nh:='b';
         pred:='baik';
         end;
81..100:begin
         nh:='a';
         pred:='amat baik';
         end;
end;
write('nilai huruf: ');
writeln(nh);
write('predikat: ');
writeln(pred);
readln;
end.

Silahkan Berkomentar Pada Form Komentar dengan sopan dan santun .. No Spam .... !!! thank's @Admin
EmoticonEmoticon