|
-
Jan 15th, 2004, 03:35 PM
#1
Thread Starter
New Member
Can anyone solve this problem?
Add the missing lines of code so that the output of the following code snippet is:
“Final array values: -978 –10 –9 18 49 99 287 463 5623 100123?”
Code:
Dim NumbersList() as Integer = {99, -10, 100123, 18, -978, 5623, 463, -9, 287, 49}
Dim a as Integer
Dim b as Integer
Dim i as Integer
For a = 1 to NumbersList.Length
For b = NumbersList.Length -1 to a Step -1
‘ADD CODE HERE
Next
Next
Debug.WriteLine(“Final array is:”)
For i = 0 to NumbersList.Length
Debug.WriteLine(“ “ + NumbersList(i))
Next
-
Jan 15th, 2004, 03:39 PM
#2
I think I speak for everyone when I say..... do your own homework.
You can ask us specific questions, but we arn't going to just "solve x" for you.
-
Jan 15th, 2004, 03:43 PM
#3
Thread Starter
New Member
Ive been beating my head on this one for hours, its killin me
-
Jan 15th, 2004, 03:45 PM
#4
PowerPoster
Do you not realize that all you are doing is sorting them from least to greatest?
-
Jan 15th, 2004, 04:06 PM
#5
Why not try researching the Array.Sort method?
-
Jan 15th, 2004, 04:15 PM
#6
Lively Member
the most obivous answer is the one often missed...
-
Jan 15th, 2004, 07:13 PM
#7
Frenzied Member
Originally posted by Edneeis
Why not try researching the Array.Sort method?
Maybe they need him to implement a very basic sort method to learn concepts, not to use the sort methods that are already available.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
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
|