You are on page 1of 2

Enriquez, Chiriathjearim C

BSABEn-4
Activity No. 2

Code

Private Sub Command1_Click()


'Calculation of value
Sum = Val(Text1.Text) + Val(Text2.Text)
Difference = Val(Text1.Text) - Val(Text2.Text)
Product = Val(Text1.Text) * Val(Text2.Text)
Quotient = Val(Text1.Text) / Val(Text2.Text)
'To display the answer on label 1

Label1.Caption = Sum
'To display the answer on label 2
Label2.Caption = Difference
'To display the answer on label 3
Label3.Caption = Product
'To display the answer on label 4
Label4.Caption = Quotient
End Sub

You might also like