[quote=sonsofliberty84]i guess all you need is to place each input in an array and then do a bubble sort on that array, then output the first and last values.[/quote]

There are two huge problems with your approach. First, your solution is doing way more than is necessary. If I was a professor giving this assignment, and you implemented your proposed solution, I would give you B even if the program worked flawlessly. You need to solve the problem [I]without[/I] adding extra complexity. If all you need to do is find the min and max values, why would you sort?

Secondly, you are suggesting a [B]bubble sort[/B]! Bubble sort is among the most inefficient of sorting methods. It's time complexity is O(n^2). Finding the max and min of a problem set is only O(n). So, basically, your solution would require however much time it would take to simply pass over the loop squared. That is a huge waste of time! Imagine you had a file with 1 billion integer entries. Do you really want to use a bubble sort on this list? Do you really want to save this list in memory?

I didn't mean to go on the offensive so much, but you need to understand the magnitude of such an error. Computer Scientists search for the simplest and most efficient correct solution. The solution you are suggesting is correct, in a way. However, it terribly inefficient and tremendously over complicated.