Posted by Sing on .
If we have any five numbers. how do we find maximum and minimum number of those.
You take the first number and store it in variable Min and Max. Then you take the second number. If that number is larger than the variable Max you overwrite Max and store that varible there. If not then you check if it is smaller than the value stored in Min. If so, you store it there, overwriting the previous stored value. You repeat this for all five variables.