create a program that will accept input the user of his/her age and will print if he/she is: child 1-2 teenager 13-19 adult 25-59 senior 60 above | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

create a program that will accept input the user of his/her age and will print if he/she is: child 1-2 teenager 13-19 adult 25-59 senior 60 above

6th Jul 2016, 2:28 PM
jessica joy lascano
jessica joy lascano - avatar
5 Answers
+ 6
and what if he is not categorised ? cuz your list is not complete... Example : If he is 3-12 he is nothing
6th Jul 2016, 3:28 PM
Greveson Axel
Greveson Axel - avatar
+ 4
Use scanner and then switch
6th Jul 2016, 3:27 PM
Valentino Compar
Valentino Compar - avatar
0
Perhaps with swing (showInputDialog)? And with switch case
6th Jul 2016, 7:27 PM
Maximilian Bauer
Maximilian Bauer - avatar
- 3
use scanner and then if-else statements.. and for uncategorised part.. display a message..
6th Jul 2016, 5:15 PM
shreyansh sethia
shreyansh sethia - avatar
- 5
jessica is this your assigment.. lets talk on fb.
6th Jul 2016, 5:14 PM
vishner nankani
vishner nankani - avatar