I created a simple program to calculate the volume of a sphere. But something wrong with the following code line
double volume=(4/3)*PI*radius*radius*radius;
producing the wrong answer.but if i change that to
double volume=PI*radius*radius*radius*4/3;
now it's giving the correct answer.
But both equations are perfectly alright according algebra. So why I get the wrong answer for the first equation?