Blog
Uncategorized
just write the solution in Java program and Include the screenshot of the program
util.Scanner;
class Main {
public static void main(String[] args) {
System.out.println(“Name: “);
System.out.println(“ID: “);
Scanner input=new Scanner(System.in);
double weight,height,BMI;
System.out.print(“Enter weight in Kg: “);
weight=input.nextDouble();
System.out.print(“Enter height in meters: “);
height=input.nextDouble();
BMI=weight/(height*height);
System.out.println(“Your BMI = ” BMI);
}
}
Answer 2