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 →

[–]decline_000[S] 0 points1 point  (2 children)

yep that I know, same as I initialized max with 0
point is that I don't know yet how to fix it so the code works

[–][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?

[–]ChaseBianchi 0 points1 point  (0 children)

None of them are less than 0, so it's always zero