Simple Java math operations
- by user1730056
I'm making a BMI calculator that doesn't seem to be working.
The math operations work if i just do something like w/h, but once i had the brackets, it returns an error.
If i change the variables w and h and use a constant number, the operation works.
Another problem is that although i'm making result a double, it seems to be rounding to the nearest int.
Could someone tell me what I'm doing wrong here?
public class ass10 {
    public static void main(String[] args) {
    bmi(223,100);
    }
    public static bmi(int w, int h){
        double result;
        result = (w/(h*h))*703
        System.out.println(result)             
    }
}