This commit is contained in:
Mykola Fesenko
2025-07-29 08:08:23 +02:00
commit 899a05907b
355 changed files with 11002 additions and 0 deletions

48
3/BMI.java Normal file
View File

@@ -0,0 +1,48 @@
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");
}
}
}