We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98534c6 commit c2a826cCopy full SHA for c2a826c
BMI.java
@@ -0,0 +1,14 @@
1
+import java.util.Scanner;
2
+public class Example {
3
+ public static void main(String args[]) {
4
+ Scanner sc = new Scanner(System.in);
5
+ System.out.print("Input weight in kilogram: ");
6
+ double weight = sc.nextDouble();
7
+ System.out.print("
8
+Input height in meters: ");
9
+ double height = sc.nextDouble();
10
+ double BMI = weight / (height * height);
11
12
+The Body Mass Index (BMI) is " + BMI + " kg/m2");
13
+ }
14
+}
0 commit comments