write a program to accept the age of a person and display if the person is a toddler (<=5 years) kid (5years &<=12) teenager (>=13 year and<=19) adult (>20 year and<60) senior citizens (>=60).
Answers
Answer:
here this your answer
Explanation:
make a brilliant
Answer:
import java.util.*;
class Age {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter your age:");
int age = sc.nextInt();
if(age<=5){
System.out.println("You are a toddler.");
}
else if(age<=5 && age>=12){
System.out.println("You are a kid.");
}
else if(age>=13&&age<=19){
System.out.println("You are a teenager.");
}
else if(age > 20 && age < 60){
System.out.println("You are an adult");
}
else if(age<=60){
System.out.println("You are a senior citizen");
}
}
}
Explanation: