Advertisement
JackHoughton00

Stages

Mar 5th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. package stages;
  2. import java.util.Scanner;
  3. public class Stages {
  4.  
  5. public static void main(String[] args) {
  6. Scanner input = new Scanner(System.in);
  7. System.out.print("Please enter an age:");
  8. int age = 0;
  9. age = input.nextInt();
  10. if (age <= 5){
  11. System.out.print("Toddler");
  12. } else {
  13. if (age <= 10){
  14. System.out.print("Child");
  15. } else {
  16. if (age <= 12){
  17. System.out.print("Pre-teen");
  18. } else {
  19. if (age <= 18 ){
  20. System.out.print("Teen");
  21. } else {
  22. if (age > 18){
  23. System.out.print("Adult");
  24. }
  25. }
  26. }
  27. }
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement