Senin, 23 Juli 2012

program hitung nilai mahasiswa dengan delphi

procedure TForm1.tbprosesClick(Sender: TObject);
begin
Edit7.Text:=FloatToStr((StrToInt(Edit4.text)+StrToInt(Edit5.text)+StrToInt(Edit6.text))/3);
if (Edit7.text >='80') then
  Edit8.Text:='NILAI ANDA A'
Else if (Edit7.Text >='70') then
  Edit8.Text:='NILAI ANDA B'
Else if (Edit8.Text >='60') then
  Edit8.Text:='NILAI ANDA C'
else if (Edit7.Text >='50') then
  Edit8.Text:='NILAI ANDA D'
else
  Edit8.Text:='NILAI ANDA TUNDA/E'

end;

procedure TForm1.tbulangClick(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
Edit6.Clear;
Edit7.Clear;
Edit8.Clear;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;

procedure TForm1.Edit1Change(Sender: TObject);
begin
Label8.Caption:=Edit1.Text;
end;

procedure TForm1.Edit2Change(Sender: TObject);
begin
Label9.Caption:=Edit2.Text;
if copy(Edit2.Text,3,1)='1' then
  Edit3.Text:='SISTEM INFORMASI'
else if copy(Edit2.text,3,1)='2' then
  Edit3.Text:='TEKNIK INFORMASI'
else if copy(Edit2.Text,3,1)='3' then
  Edit3.Text:='MANEJEMEN INFORMASI'
else if copy(edit2.Text,3,1)='4' then
Application.MessageBox('maaf stambuk digit 3 salah',':::info:::',MB_ICONINFORMATION);
end;

procedure TForm1.Edit3Change(Sender: TObject);
begin
Label10.Caption:=Edit3.Text;
end;

procedure TForm1.Edit8Change(Sender: TObject);
begin
Label11.Caption:=Edit8.Text;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
Edit6.Clear;
Edit7.Clear;
Edit8.Clear;
Edit3.Enabled:=false;
Edit7.Enabled:=false;
Edit8.Enabled:=false;
end;

end.

illank bundrank

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 komentar:

Poskan Komentar