Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
You'll get Teenager printed. Reason: age is 18. First if statement checks if it is greater than 14. It is, so we enter that statement, where we have another if statement, which checks if age is grater than 18, it is not, cause 18 equals 18, so we go to else statement, which is Teenager.
5th Jan 2017, 8:09 PM
Andrii Voloshchuk
Andrii Voloshchuk - avatar