CCC '08 J1 - Body Mass Index
Source Code
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
float a = in.nextFloat();
float b = in.nextFloat();
b = a / (b * b);
if(b < 18.5){
System.out.println("Underweight");
} else if(b >= 18.5 && b <= 25){
System.out.println("Normal weight");
} else{
System.out.println("Overweight");
}
}
}