Ok so i have to do this: Stretch #2: Write a loop that iterates through the array named valuesand finds the largest number in the array. Place the value into the variable maximum.
I tired not doing it with a loop, but by :
{
if values[1] > values[0]
{
maximum = values[1]
}
else if values[2] > values[1]
{
maximum = values[2]
}
else if values[3] > values[2]
{
maximum = values[3]
}
else if values[4] > values[3]
{
maximum = values[4]
}
}
That didn't work and I don't know what to do.