Calculating Volume of Cubes and Cuboids