Untitled
plain_text
a month ago
761 B
1
Indexable
Never
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Ingrese su altura: "); double altura = input.nextDouble(); System.out.print("Ingrese su peso: "); double peso = input.nextDouble(); double imc = peso / (altura * altura); System.out.println("IMC: " + imc); if (imc > 25.0) { System.out.print("Exceso de valor IMC"); } else { if (imc >= 18.5) { System.out.print("Valores estables de IMC"); } else { System.out.print("Por debajo de los valores estables del IMC"); } } } }