Ok, so I came across the problem (yes, it was class work but I have finished it and moved on 19 / 20 on it) and it required finding the largest number of 5 numbers entered. Now I ended up solving this uses if statements like this:
if(A > B && A > C && A > D && A > E) // Example statements would have 5 of these
Now I was wondering if there is a better way of doing this, some include I could use or code I could write if I ever needed to solve something like this in the future.
Is there some way I could use an array and an include to sort it?
Or use a binary tree and always move backward?
Btw thanks for all of the help, you guys are great!
Cool, I never thought of this. With my solution if tow or more are tied for the lowest the if statements would output a 0 where as this would work. I had to use a series of booleans where if two or more are true then it presents a tie. That solution I made just isn't very practical for problems with more that 5ish inputs.