You are viewing a single comment's thread. Return to all comments →
Try changing "else if(a==9)" to just an else statement because if/else chains always need to end with an else statement to default to if no other case is true.
your code would only work if one of the numbers entered was eight.
you should include all numbers less than 9.
That is not true. It is perfectly acceptable to have an if/if else with no last else case if your intention is to have a situation where no statement executes if your specific conditions are not met. It is analogous to writing...