I have a problem with my for loop. I would like to determine if a value in the loop is less than the previous value and then change the value if so.
I get the error "Index exceeds the number of array elements (7)." at the if statement.
i know what it means but can not see a way to avoid it.