JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.util.Scanner;
public class prac5{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.print("Enter weight in pound : ");
float weight = sc.nextFloat();
System.out.print("Enter height in inches : ");
float height = sc.nextFloat();
weight *= 0.45359237;
height *= 0.0254;
float BMI = weight/(height*height);
System.out.println("\nYour Body Mass Index(BMI) is "+);
}
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Uruchom