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

2
7/.gitingore Normal file
View File

@@ -0,0 +1,2 @@
*.class
*.~ava

BIN
7/BMI_BR.class Normal file

Binary file not shown.

52
7/BMI_BR.java Normal file
View File

@@ -0,0 +1,52 @@
import java.io.*;
import java.text.DecimalFormat;
public class BMI_BR {
public static void main(String args[]) throws IOException {
DecimalFormat antwortFormat = new DecimalFormat("0.0");
BufferedReader eingabe = new BufferedReader(new InputStreamReader(System.in));
String speicher;
double bmi = 0;
try {
System.out.print("Gewicht: ");
speicher = eingabe.readLine();
double gewicht = Double.parseDouble(speicher);
System.out.print("Große: ");
speicher = eingabe.readLine();
double grosse = Double.parseDouble(speicher);
bmi = (gewicht/ (grosse*grosse));
} catch(NumberFormatException e) {
System.out.println("Geben Sie Zhal");
}
System.out.println("BMI = " + antwortFormat.format(bmi));
System.out.println("BMI = " + (Math.round(bmi*10.0)/10.0));
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");
}
}
}

52
7/BMI_BR.~ava Normal file
View File

@@ -0,0 +1,52 @@
import java.io.*;
import java.text.DecimalFormat;
public class BMI_BR {
public static void main(String args[]) throws IOException {
DecimalFormat antwortFormat = new DecimalFormat("0.0");
BufferedReader eingabe = new BufferedReader(new InputStreamReader(System.in));
String speicher;
double bmi = 0;
try {
System.out.print("Gewicht: ");
speicher = eingabe.readLine();
double gewicht = Double.parseDouble(speicher);
System.out.print("Große: ");
speicher = eingabe.readLine();
double grosse = Double.parseDouble(speicher);
bmi = (gewicht/ (grosse*grosse));
} catch(NumberFormatException e) {
System.out.println("Geben Sie Zhal");
}
System.out.println("BMI = " + antwortFormat.format(bmi));
System.out.println("BMI = " + (Math.round(bmi*100.0)/100.0));
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");
}
}
}

BIN
7/BR.class Normal file

Binary file not shown.

23
7/BR.java Normal file
View File

@@ -0,0 +1,23 @@
import java.io.*;
public class BR {
public static void main(String args[]) throws IOException {
String speicher;
BufferedReader eingabe = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Geben Sie Zahl: ");
speicher = eingabe.readLine();
try {
int zahl = Integer.parseInt(speicher);
System.out.println("Quadrat: " + (zahl*zahl));
} catch(NumberFormatException e) {
System.out.println("Geben Sie ganzzahlige zahl");
}
}
}

23
7/BR.~ava Normal file
View File

@@ -0,0 +1,23 @@
import java.io.*;
public class BR {
public static void main(String args[]) throws IOException {
String speicher;
BufferedReader eingabe = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Geben Sie Zahl: ");
speicher = eingabe.readLine();
try {
int zahl = Integer.parseInt(speicher);
System.out.println("Quadrat: " + (zahl*zahl));
} catch(NumberFormatException e) {
System.out.println("Geben Sie ganzzahlige zahl");
}
}
}