Leer sexo, edad y pedir telefono
import java.util.*;
public class telefono{
public static void main(){
int telefono, sexo, edad;
Scanner teclado = new Scanner (System.in);
System.out.println("Sexo: \n1.M\n2.F");
sexo = teclado.nextInt();
System.out.println("Edad: ");
edad = teclado.nextInt();
if (sexo == 2 && edad >18 && edad < 25){
System.out.println("Telefono: ");
telefono = teclado.nextInt();
}
}
}