Looking for reliable answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.
Sagot :
Answer:
Explanation:
El codigo solicita los datos y los analiza. Si estan bien continua, sino los vuelve a solicitar. Cuando esten todos los datos bien los imprime.
import java.util.Scanner;
class Brainly {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Nombre: ");
String nombre = in.nextLine();
int Edad, peso;
while (true) {
System.out.println("Edad: ");
Edad = in.nextInt();
if ((Edad >= 18) && (Edad <= 50)) {
break;
}
}
while (true) {
System.out.println("Peso: ");
peso = in.nextInt();
if ((peso >= 50) && (peso <= 100)) {
break;
}
}
System.out.println("Nombre: " + nombre);
System.out.println("Edad: " + Edad);
System.out.println("Peso: " + peso);
}
}

We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Thank you for visiting. Our goal is to provide the most accurate answers for all your informational needs. Come back soon. Keep exploring Westonci.ca for more insightful answers to your questions. We're here to help.