|
-
Oct 29th, 2010, 08:55 AM
#1
Thread Starter
New Member
module multiplication loop
Hi I'm new to VB an i'm trying to make a multiplication and sum table only form 1 to 12. I get all kind of error I don't know what to do, help please?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim numMulti, numSum, tCounter, multiSum As Integer
tCounter = 0
\\number enter by user
numMulti = CDbl(TextBox1.Text)
numSum = CDbl(TextBox1.Text)
\\module call statement
Call multiSuma(byval tablaMulti, tablaSuma as integer)
\\list box where the result will be display
ListBox1 = CStr(tMulti)
ListBox2 = CStr(tSum)
End Sub
End Class
\\start module
Sub multiSuma(ByRef tCounter, ByVal numMulti, ByVal numSum As Integer)
\\variable to save the data of te sum and multiplication
Dim tSum, tMulti As Integer
\\start loop with a counter
Do Until tCounter = 12
tMulti = tCounter * numMulti
tSum = tCounter + numSum
tCounter = tCounter + 1
Loop
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|