if anyone could help this would be great. I'm tring to figure out how to find the max and min number out of a set of user inputs numbers in a program. for example the user inputs 4 set of numbers like 30 79 91 and 4 and i want to add the sum of them but subtract the max and min numbers. How would I do this??
Now that is a much better question. You have gone from essentially asking us to do your homework for you, to giving us some code you're having trouble with.
Firstly, this makes no sense else ( score < smallestScoreSoFar)
I suspect you meant elseif ( score < smallestScoreSoFar)
but this has a problem. What happens if only one number is entered? Then that should be the biggest AND smallest, right? So each input number needs to be checked for being the biggest AND for being the smallest, like this: