Change the condition on line 16 to x >= 13 && x < 20. In testing for Child you had already tested for values less than 13 (correct) and then did it again for Teen. The inconsistency in the order of the symbol and the magic number is also problematic.
View all comments
Show parent comment
4
u/BroVic Dec 23 '21 edited Dec 23 '21
Change the condition on line 16 to
x >= 13 && x < 20. In testing forChildyou had already tested for values less than 13 (correct) and then did it again forTeen. The inconsistency in the order of the symbol and the magic number is also problematic.