I have been working on this program for nearly a day now and I have had no luck getting it to work. Can anyone give me the answer informing me where my mistake lies within the program. The program is suppose to sort the list of numbers in asending order counting each loop as the process (list) is completed. Here is the program: [ edited to format code and to preserve formatting using the [code] and [/code] UBB tags -ds ] [ November 27, 2004: Message edited by: Dirk Schreckmann ]
Dirk may post ahead of this, but here are a few hints: 1. The j loop should go from i to 1 less than the highest array index. 2. You only need the first if statement. 3. The block controlled by the if statement has the braces {} in the wrong places.
What happens when you try to compile your code? Do any error messages get printed? What are they?
If you're getting a lot of error messages, I'd recommend trying to solve the first one first, recompiling, and then handling the first of any new problems that arise.
If you're not quite sure what an error message means or how to solve it, post it here, along with the problem code, and I'm sure folks will be glad to help nudge you in the right direction.
When I program, in general, I do everything in baby steps. For example, I don't write a line of code without first knowing that every existing line compiles without errors. That way, when a compiler error does occur, I know where it is, and I'm not trying to understand and solve a handful of problems all at once, since that one line of code generally doesn't have more than one or two problems.