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

20
2/BMI2.~ava Normal file
View File

@@ -0,0 +1,20 @@
import java.util.Scanner;
public class BMI2 {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
double gewicht = 67.0;
double grosse = 1.67;
System.out.print("Gewicht = ");
if(input.hasNextDouble()) {
gewicht = input.nextDouble();
}
System.out.print("Zahl a = ");
if(input.hasNextDouble()) {
grosse = input.nextDouble();
}
System.out.println("BMI: " + (gewicht/ (grosse*grosse)));
}
}