Well, supplying the errors you are getting would be helpful.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
Please use code tags when posting code. Read the information in the links below.
This is how I code it in c/c++:
for(a = 0; a < highSubscript-1; ++a)
{
for(b = 0; b < highSubscript; ++b)
{
if(array[a] > array[b])
{
temp = array[a];
array[a] = array[b];
array[b] = temp;
}
}
}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
I think you may be best off using KeyboardReader to take input.
And you definitely have to use Ancient Dragon's suggestion for the bubble sort.
kimbokasteniv
Junior Poster in Training
50 posts since Nov 2006
Reputation Points: 13
Solved Threads: 4