if(value > max) max = value; else if(value < min) min = value;
Consider this: what happens when max = 10, min = 100, and value is 21? Why isn't min picking up 21?
Next consider this: what happens when max = 50, min = 50 and value is 10? Why is min picking up 10 in this case?
This post has been edited by Skydiver: 06 July 2012 - 05:15 PM

New Topic/Question
Reply




MultiQuote




|