int maxIndex = 0;
for (index = 1; index < list.length; index++)
if (list[maxIndex] < list[index])
maxIndex = index;
biggestnumber = list[maxIndex];
System.out.println("The largest number you entered was: " + biggestnumber);
I need to somehow modify this so that it finds the smallest number in an array... i can't seem to figure out what i need to change... any tips/help? Thanks in advance!

New Topic/Question
Reply




MultiQuote





|