Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package stages;
- import java.util.Scanner;
- public class Stages {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- System.out.print("Please enter an age:");
- int age = 0;
- age = input.nextInt();
- if (age <= 5){
- System.out.print("Toddler");
- } else {
- if (age <= 10){
- System.out.print("Child");
- } else {
- if (age <= 12){
- System.out.print("Pre-teen");
- } else {
- if (age <= 18 ){
- System.out.print("Teen");
- } else {
- if (age > 18){
- System.out.print("Adult");
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement