int r = 10;
double pi = 3.141;
double vol1 = 4 * pi / 3 * r * r * r; //4188.0
double vol2 = pi * r * r * r * (4 / 3);//3141.0
Why do the two calculations vol1 and vol2 give two different results? The order of operations says that parentheses are the only precedence to consider and it should not affect the result?