Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Miscellaneous/BMI_Calculator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// BMI Calculator Program
import java.util.Scanner;
public class Example
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter Your weight in kilogram: ");
double weight = sc.nextDouble();
System.out.print("\nEnter Your height in meters: ");
double height = sc.nextDouble();
double BMI = weight / (height * height);
System.out.print("\nThe Body Mass Index (BMI) is " + BMI + " kg/m2");
}
}