Calculating volume of a sphere and cylinder