Hello students!
This article is going to discuss about the Visual Basic 6.0 code on how to add the two integers or finding the sum of two integers entered by the user .
In addition of two integers you must consider the following objects:
1. one form
2. two text boxes
3. three labels
4. one command button
SOURCE CODE:
Private Sub Command1_Click()
Label3 = Val(Text1) + Val(Text2)
End Sub
However, you can also use this code for adding three or more numbers from the user by simply putting another textboxes for a succeeding numbers that are going to add.
If you want the JAVA code for adding two integers just click
For more information keep checking itlibraryetc.blogspot.com.
This article is going to discuss about the Visual Basic 6.0 code on how to add the two integers or finding the sum of two integers entered by the user .
In addition of two integers you must consider the following objects:
1. one form
- Form1 - has a caption of "Addition of Two Integers"
2. two text boxes
- Text1- is where the first integer will be inputed (Text: must be emptied)
- Text2- is where the second integer will be inputed (Text: must be emptied)
3. three labels
- Label1- is placed beside Text1 (Caption: Enter 1st no.)
- Label2- is placed beside Text2 (Caption: Enter 2nd no.)
- Label3 - is where the sum will display, placed below (Caption: remains blank)
4. one command button
- Command1 - use for an action, which add the two integers (Caption: ADD)
SOURCE CODE:
Private Sub Command1_Click()
Label3 = Val(Text1) + Val(Text2)
End Sub
However, you can also use this code for adding three or more numbers from the user by simply putting another textboxes for a succeeding numbers that are going to add.
If you want the JAVA code for adding two integers just click
For more information keep checking itlibraryetc.blogspot.com.


No comments:
Post a Comment