Simple program help for beginner.

it appears from your code that any value greater than 0 is read as HIGH.

Almost - in C, the convention is that any non-zero value, positive or negative, is interpreted as "true".