I have a Form TForm1
having 5 TEdit
and 2 TBitBtn
.
I also need the Program so that after inputting Numeric Data in Edit1
and Edit2
on BitBtn1Click
, Edit1
and Edit2
value will summed and will be displayed in Edit3
.
You want to do something like this:
var
val1, val2, sum: Integer;
...
val1 := StrToInt(Edit1.Text);
val2 := StrToInt(Edit2.Text);
sum := val1 + val2;
Edit3.Text := IntToStr(sum);
If you want floating point arithmetic do it like this
var
val1, val2, sum: Double;
...
val1 := StrToFloat(Edit1.Text);
val2 := StrToFloat(Edit2.Text);
sum := val1 + val2;
Edit3.Text := FloatToStr(sum);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With