Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Program to display the Multiple of a given number
Author:
Swathi
Submitted:
4/9/2012
Version:
VB 2010
Compatibility:
VB 2010
Category:
Mathematics
Views:
10849
Given any number the output contains the multiple of the given number.
Declarations:
Textbox1( in the text property assign the required number. eg: 7) Textbox2( in the text property assign the required number. eg: 7) Listbox1 Button1
Code:
Public class form1 Private Sub Button1_Click(Byval Sender...................................) Dim Number1 As Integer Dim Number2 As Integer Dim Multiplier As Integer Dim Answer As Integer Dim i As Integer Number1 = Val(Textbox1.Text) Number2 = Val(Textbox2.Text) Multiplier = 1 Do While Multiplier <= 10 For i = Number1 To Number2 Answer = i*Multiplier Listbox1.Items.Add(i & "*" & Multiplier & "=" & Answer) Next i Multiplier = Multiplier + 1 Loop End Sub End Class
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement