+ 1
Modify this code please.
Hello can anyone help to change the code as such is the age if <= 16 it should say "too young" and the age is >=42 it should say "Adult" and if the age is >=72 it should say "Senior". Thanks! https://code.sololearn.com/cAAxX76I7uxW/?ref=app https://code.sololearn.com/cAAxX76I7uxW/?ref=app
2 Réponses
+ 2
Can't use ranges in switch statements in standard c++. Some compilers allow for stuff like "case 17...42:", others don't, so it isn't recommended to use.
Use else if statements to define ranges, it's more reliable. Reply back if you need me to modify it to use else if instead of switch.
0
its done thanks!!!