48 lines
1.0 KiB
Plaintext
48 lines
1.0 KiB
Plaintext
import java.util.Scanner;
|
|
public class BMI{
|
|
public static void main(String args[]) {
|
|
Scanner input = new Scanner(System.in);
|
|
|
|
|
|
System.out.print("Gewicht: ");
|
|
double gewicht = input.nextDouble();
|
|
System.out.print("Große: ");
|
|
double grosse = input.nextDouble();
|
|
|
|
double bmi = (gewicht/ (grosse*grosse));
|
|
|
|
System.out.println("BMI = " + bmi);
|
|
if(bmi <= 16) {
|
|
System.out.println("Starkes untergewicht");
|
|
} else if (bmi <= 17) {
|
|
System.out.println("Mäßiges untergewicht");
|
|
}
|
|
else if (bmi <= 18.5) {
|
|
System.out.println("Leichtes untergewicht");
|
|
}
|
|
else if (bmi <= 25) {
|
|
System.out.println("Normalgewicht");
|
|
}
|
|
else if (bmi <= 30) {
|
|
System.out.println("Präadipositas");
|
|
}
|
|
else if (bmi <= 35) {
|
|
System.out.println("Adipositas Grad 1");
|
|
}
|
|
else if (bmi <= 40) {
|
|
System.out.println("Adipositas Grad 2");
|
|
}
|
|
else {
|
|
System.out.println("Adipositas Grad 3");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
} |