VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Takes inputed numbers (in any order) and sorts them

by Jonny Holmes (1 Submission)
Category: Math/Dates
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Sat 6th March 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Takes inputed numbers (in any order) and sorts them

Rate Takes inputed numbers (in any order) and sorts them



Dim num(3) As Variant

num(1) = TXTNUMONE
num(2) = txtnumtwo
num(3) = txtnumthree

For i = 1 To 2
   For j = i To 3
      If num(i) > num(j) Then
          temp = num(j)
          num(j) = num(i)
          num(i) = temp
      End If
   Next j
Next i

    For i = 1 To 3
        lstsorted.AddItem num(i)
    Next i
    
TXTNUMONE = ""
txtnumtwo = ""
txtnumthree = ""

Download this snippet    Add to My Saved Code

Takes inputed numbers (in any order) and sorts them Comments

No comments have been posted about Takes inputed numbers (in any order) and sorts them. Why not be the first to post a comment about Takes inputed numbers (in any order) and sorts them.

Post your comment

Subject:
Message:
0/1000 characters