English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

You can use a couple IF THEN statements... or use SORT or full rearrange using a new output array and loop through. HOW you do it, is up to you.

If you can't even write a C++ program, you need more help than we can give in this forum.

(Don't any one post any source code! Don't do homework!)

2007-11-07 11:29:11 · answer #1 · answered by Kasey C 7 · 0 0

Dim decNumber1 As Decimal = txtNumber1.Text
Dim decNumber2 As Decimal = txtNumber2.Text
Dim decNumber3 As Decimal = txtNumber3.Text
Dim decFirst As Decimal
Dim decSecond As Decimal
Dim decThird As Decimal
If decNumber1 > decNumber2 And decNumber1 > decNumber3 Then
decFirst = decNumber1
If decNumber2 > decNumber3 Then
decSecond = decNumber2
decThird = decNumber3
Else
decSecond = decNumber3
decThird = decNumber2
End If
ElseIf decNumber2 > decNumber1 And decNumber2 > decNumber3 Then
decFirst = decNumber2
If decNumber1 > decNumber3 Then
decSecond = decNumber1
decThird = decNumber3
Else
decSecond = decNumber3
decThird = decNumber1
End If
ElseIf decNumber3 > decNumber1 And decNumber3 > decNumber2 Then
decFirst = decNumber3
If decNumber2 > decNumber1 Then
decSecond = decNumber2
decThird = decNumber1
Else
decSecond = decNumber2
decThird = decNumber1
End If
ElseIf decNumber1 = decNumber2 Or decNumber1 = decNumber3 Or decNumber2 = decNumber3 Then
MessageBox.Show("Two of the numbers are the same. Cannot compute.")
End If
MessageBox.Show("The numbers from highest to lowest are: " & decFirst & " " & decSecond & " " & decThird)

2007-11-07 19:49:36 · answer #2 · answered by highschoolguy2009 2 · 0 2

fedest.com, questions and answers