Re: [Delphi]Program a Simple Calculator
Posted: Tue Mar 09, 2010 4:06 pm
lmao i take ss show uBoredness wrote:NPNTRavenOfDeath wrote:i could code a scientific calc.
The community that will never stop discussing!
https://xemectrum.guyz92.men/
lmao i take ss show uBoredness wrote:NPNTRavenOfDeath wrote:i could code a scientific calc.
yes...wizme wrote:isnt it the same just the cal method diff ? ...
Code: Select all
Public Class Form1
Private Function AddTwoNumbersResult(ByVal first As Integer, ByVal second As Integer) As Integer
Dim answer As Integer
answer = first + second
AddTwoNumbersResult = answer
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim first As Integer
Dim second As Integer
Dim result As Integer
first = Val(TextBox1.Text)
second = Val(TextBox2.Text)
result = AddTwoNumbersResult(first, second)
MsgBox("The answer is " & result)
End Sub
End Class
Code: Select all
procedure TForm1.BtnPlusClick(Sender: TObject);
begin Handleop('+'); end;