procedure TForm2.Button1Click(Sender: TObject);
var mid,finall,hadir,total : real ;
begin
mid := StrTofloat(Edit1.Text) * 0.3 ;
finall := StrTofloat(Edit1.Text) * 0.5 ;
hadir := StrTofloat(Edit1.Text) * 0.2 ;
total := mid + finall + hadir;
if total > 85 then
Edit4.Text := 'A'
else if total > 75 then
Edit4.Text := 'B'
else if total > 65 then
Edit4.Text := 'C'
else if total > 55 then
Edit4.Text := 'D'
else
Edit4.Text := 'E'
end;
Tidak ada komentar:
Posting Komentar