Hello, I'm working on this assignment and the instructions are to ask the user to enter 10 numbers and store it in an array. Then we're supposed to print the numbers entered followed by the lowest and highest integer they entered. My problem is printing the lowest number but it prints the highest. What am I missing?
I do not know if you can use this or not. From the "<algorithm>" header file you have "std::sort" where after all the numbers are input you could sort the array then element (0)zero would contain the lowest number and element 9 would contain the highest.
If you can not use "std::sort" you could always write your own sort routine.
If you are not familiar with this yer C++ like other languages are (0)zero based, so you array elements start at (0)zero and got to 9 for 10 elements in the array.