18+

  • 3
  • Locked
Use the keyboard to enter the name and age. If the age is less than 18, display "Grow up a little more".
You can't complete this task, because you're not signed in.
Comments (2)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Marcin
Level 5 , Warszawa, Poland
22 February, 21:25
String name = scanner.nextLine();
        int num = scanner.nextInt();
        String out = num < 18 ? "Grow up a little more": "";
        System.out.println(out);
With input data Pitt 19 i failed with If the age is greater than or equal to 18, don't display anything.
Anon#10923148
Level 9 , Sweden
22 January, 10:01
damm the box is small😂