0
Why is the output 8? And not 10.6666667
doubleĀ y = 4; Ā Ā y =Ā y * (8 / 3);
1 Answer
+ 5
because you have to cast one of the numbers in the division to a double.
doubleĀ y = 4;
Ā Ā y =Ā y * ((double)8 / 3);
without casting it to double, (8/3) = 2