Because you compare highestValue with an uninitialized value.
Your logic for the program should be something like thisCode:/* Always initialize an object or array before you use it*/ double a[9]; ...... if ( a[ i ] > highestValue )
- Fill array with values
- Print them (if you want it of course)
- Set highestValue to the first element in the array
- loop through the array(start at the second element) and check for highest value
- Print the highest value
Give it another try and if something is still unclear just ask .