program Nilai_Akhir;
uses
WinCrt;
var
tugas,mid,final,nilai:real;
nilai1:integer;
begin
clrscr;
writeln('masukkan nilai tugas=');
readln (tugas);
writeln ('masukkan nilai mid=') ;
readln (mid) ;
writeln ('masukkan nilai final=') ;
readln (final) ;
nilai :=0.3*tugas+0.3*mid+0.4*final ;
writeln ('total nilai=',nilai :4:2);
nilai1:=trunc(nilai);
case nilai1 of
80..100:writeln('Nilai A');
71..79:writeln('Nilai B');
61..70:writeln('Nilai C');
51..60:writeln('Nilai D');
0..50:writeln('Nilai E');
end;
END.
0 comments:
Post a Comment