Home > Back-end > Multiplication sign and devide the priority is not the same, why BMI calculation without parentheses
Multiplication sign and devide the priority is not the same, why BMI calculation without parentheses
Time:09-16
int x; Float y; Double BMI;
BMI=x/y * y; System. The out. Println (" your BMI value is: "+ BMI); }
}
CodePudding user response:
Weight is your x, y is the height? If so, the BMI is not equal to x/y) (y *? Don't know your problem, multiplication sign and devide priority is the same, but with the priority of words do not add parentheses when calculated from left to right in turn