Ok, I'm doing this program for class and have tried a million times to do this, but I just can't. I use an array of 20 numbers, ask the user to enter them, and then take the average. I did that all fine and peachy -- it's easy.
Now he wants us to have the program determine the closest number to the average and the farthest number from the average. I have tried all kinds of for loops and if tests. I just can't get it to work correctly.
Any help would be appreciated. Thanks.