Print a multiplication table for a given number.
Such a simple program and the Powerful Output..Right..?
(E) Errors :
(A)Program Design :
(B) Property(Controls Used) :
- One Label with Caption Enter a number to print Multiplication Table
- One TextBox with Name-Text1 and Text Property is Blank
- One Command Button with Name-Command1 and Caption -Print
C) Attaching Code to the Object :
Private Sub Command1_Click()
Dim counter, n, p As Integer
n = Val(Text1.Text)
For counter = 1 To 10
p = n * counter
Print n; " x "; counter; " = "; p
Next counter
End Sub
|
(D) Output :
(E) Errors :
If found any errors while running your VB program, or want to put your comment about any program , please click Comment section , to post.
- ====================================================================
No comments:
Post a Comment