|
-
Jan 3rd, 2010, 04:22 PM
#13
Re: How to put 5 numbers in this order 1,2,3,4,5
you've only given me 4 numbers to work with. but:
vb Code:
Dim num1 As Integer = Val(num1TextBox.Text)
Dim num16 As Integer = Val(num16TextBox.Text)
Dim num17 As Integer = Val(num17TextBox.Text)
Dim num18 As Integer = Val(num18TextBox.Text)
Dim a As Integer = math.abs(num1 - num16)
Dim b As Integer = math.abs(num1 - num17)
Dim c As Integer = math.abs(num1 - num18)
dim numbers() as integer = {a, b, c}
array.sort(numbers)
label1.text = numbers(0)
label2.text = numbers(1)
label3.text = numbers(2)
there are plenty of online resources + tuition available for beginners.
try this:
http://www.homeandlearn.co.uk/NET/vbNET.html
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
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
|