procedure TForm1.ButtonProsesClick(Sender: TObject);
var n:real;
begin
n:=StrToFloat(EditNilai.Text);
if(n>100)or(n<0)then EditGrade.Text:='ERROR'
else
if(n>=80)then EditGrade.Text:='A'
else
if(n>=60)then EditGrade.Text:='B'
else
if(n>=40)then EditGrade.Text:='C'
else
if(n>=20)then EditGrade.Text:='D'
else
if(n>=0)then EditGrade.Text:='E';
end;
procedure TForm1.ButtonHapusClick(Sender: TObject);
begin
EditNilai.Clear;
EditGrade.Clear;
end;
procedure TForm1.ButtonSelesaiClick(Sender: TObject);
begin
application.Terminate;
end;
end.
Semoga bermanfaat,,
Wenda Alifulloh, Bandung 2013
Tidak ada komentar:
Posting Komentar
Mari Budayakan Berkomentar yang Baik, Sopan, dan Ramah, Sesuai Budaya Indonesia.