import java.util.Scanner; public class VariantOfFirstProg2 { public static void main(String[] a) { Scanner sc = new Scanner(System.in); System.out.println("what is your name:"); String n = sc.next(); System.out.println("what is your age:"); int age = sc.nextInt(); // I'm printing only ONE line, according to the age if (age < 20) { if (age < 13) { // to the child System.out.println("Should we play lego?"); } else { // to the teenager System.out.println("Want to go to the hip-hop party?"); } } else { // to the adult System.out.println("No play - go back to work!"); } } }