Professional Documents
Culture Documents
1. Aim: Write a Program in VB to accept Numbers from user (in textbox) and perform all
arithmetic operation on that numbers.
2. Theory/Logic: Here two numbers are entered by user and user can perform all arithmetic
operations i.e addition, substraction, multiplication, division, square, squareroot etc. For an
example if we want to multiply two numbers then first enter both numbers and then click on
the command button showing multiplication. And we will get the desired output.
The controls which are used in project are listed below with respective properties.
Program Code:
a = Val(Text1.Text)
b = Val(Text2.Text)
End Sub
a = Val(Text1.Text)
b = Val(Text2.Text)
End Sub
a = Val(Text1.Text)
b = Val(Text2.Text)
a = Val(Text1.Text)
b = Val(Text2.Text)
End Sub
a = Val(Text1.Text)
b = Val(Text2.Text)
End Sub
a = Val(Text1.Text)
b = Val(Text2.Text)
End Sub
b = Val(Text2.Text)
Label4.Caption = "Square Root of " & a & " is " & Sqr(a)
End Sub
Output: