WAP of Addition,Subtraction,Multiplycation...
'controls Property Setting 'Textbox1 Name Text1 ' Caption - 'Textbox2 Name Text2 ' Caption - 'Label1 Name Lebel1 ' Caption Enter first number 'Label2 Name Lebel2 ' Caption enter second number 'Label3 Name Lebel3 ' Caption Result 'command1 Name command1 ' Caption Addition 'command2 Name command2 ' Caption Subtraction 'command3 Name command3 ' Caption Multiplication 'command4 Name command4 ' Caption Dividetion 'command5 Name command5 ' Caption Mod '---------------------------------------------------------- ' Code Dim a as Integer Dim b as Integer Dim c as Integer Private Sub command1_click() a=Val(Text1.text) a=Val(Text2.text) c=a+b Lebel3=c End Sub Private Sub command2_click() a=Val(Text1.text) a=Val(Text2.text) c=a-b Lebel3=c End Sub Private Sub command3_click() a=Val(Text1.text) a=Val(Text2.text) c=a*b Lebel3=c End Sub Private Sub command4_click() a=Val(Text1.text) a=Val(Text2.text) c=a/b Lebel3=c End Sub Private Sub command5_click() a=Val(Text1.text) a=Val(Text2.text) c=aModb Lebel3=c End Sub
No comments:
Post a Comment