The volume of a sphere is given by the following formula

Where r represents the radius of the sphere. The diameter of our sphere is 12 inches. The radius is half of the diameter, therefore, the radius of our sphere is 6 inches. Using this radius value on our equation, we have

The volume of a cylinder is given by the following formula

Where r represents the radius and h the height of the cylinder. The diameter of our cylinder is 10 inches. The radius is half of the diameter, therefore, the radius of our cylinder is 5 inches. The height is also given and it is 12 inches. Using those values on the formula, we have

Comparing the volumes, we have

The volume of the cylinder is greater than the volume of the sphere.