Jeez, lot's of bad ideas here....
Read in all the numbers into an array (ary[]) first, do NOT store the -99. If you enter 5, 8, 6, 3, -99, your count should be 4, not 5.
Then set lowval to your first element, ary[0] because it could be the lowest. Then loop from 1 to count for the test.