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.
2 parents 98534c6 + c2a826c commit 8258f67Copy full SHA for 8258f67
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