backup
This commit is contained in:
20
2/BMI2.java
Normal file
20
2/BMI2.java
Normal 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("Große = ");
|
||||
if(input.hasNextDouble()) {
|
||||
grosse = input.nextDouble();
|
||||
}
|
||||
|
||||
System.out.println("BMI: " + (gewicht/ (grosse*grosse)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user