Comparing numbers using for

Mar 1, 2015 at 11:54am
Hey guys, how do you compare 5 numbers and print the biggest, only using for?
Last edited on Mar 1, 2015 at 11:54am
Mar 1, 2015 at 12:09pm
you can store it in array.
and make a variable temp.

in the for loop.
compare the first one to the second and store the high one in temp and then compare it in the next one and so on.
Topic archived. No new replies allowed.