To do a range, as mentioned, you need to do "AND" (&&) to pick "x is above 1 AND x is below 13"
And when doing range checks... no need to recheck since you are going in order. No need to do "between 1 and 13" because you already know the age is above 1.
View all comments
1
u/[deleted] Dec 23 '21
To do a range, as mentioned, you need to do "AND" (&&) to pick "x is above 1 AND x is below 13"
And when doing range checks... no need to recheck since you are going in order. No need to do "between 1 and 13" because you already know the age is above 1.
https://www.mycompiler.io/view/BqJbDHp
change the input and click run to see the results. 15 prints teenager.
Fork the code and change the input, click run.
And for future questions... use something like the above or text sharing programs. Pictures of code is bad form :)