procedure
TForm1.Button1Click(Sender: TObject);
begin
Edit3.Text:=IntToStr(StrToInt(Edit1.Text)*(StrToInt(Edit2.Text)));
Edit4.Text:=FloatToStr(StrToFloat(Edit1.Text)/(StrToInt(Edit2.Text)));
end;
end
2. Program Tambah Kurang
procedure
TForm1.Button1Click(Sender: TObject);
begin
edit3.Text:=inttostr(strtoint(edit1.Text)+(StrToInt(edit2.Text)));
edit4.Text:=inttostr(strtoint(edit1.Text)-(StrToInt(edit2.Text)));
end;
procedure
TForm1.FormCreate(Sender: TObject);
begin
Label1.Font.Color:=clred;
Label2.Font.Color:=clred;
Label3.Font.Color:=clred;
Label4.Font.Color:=clred;
Label5.Font.Color:=clgreen;
end;
end.
Tidak ada komentar:
Posting Komentar