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
10 changes: 5 additions & 5 deletions BMI Calculator.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import java.util.Scanner;
public class Main{
public static void main (String[] args){
System.out.println("hello nikhil");
System.out.println("Welcome to BMI Calculator");
Scanner input = new Scanner(System.in);
System.out.println("enter your name: ");
String name = input.next();
System.out.println("enter your name"+ name);
System.out.println("enter your height in m : ");
float height= input.nextFloat();
System.out.println("enter your weight in kgs : ");
float weight= input.nextFloat();
System.out.println("enter number of days you workout : ");
float days= input.nextInt();
float days= input.nextFloat();
float BMI= weight/(height*height);
System.out.println("HEY"+ name + "your height is" + height + "and your weight is" + weight + "so your BMI is " + BMI);
System.out.println("Hey"+ name + "your height is" + height + "and your weight is" + weight + "so your BMI is " + BMI);
}
}
}