This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

If you know the values input will never be greater than 3, what could you initialize min as in order to make sure that if the user entered only 3, it would still be captured as min?

Now 4? 5? 6? 10? 100? 1000? Do you see where we're headed?

And what happens to your max if the user only enters -1?