The height of the cylinder is the sum of the diameters of the spherical balls, which is 7cm+7cm+7cm=21cm.
The radius of the cylinder is half of the diameter of the spherical balls which is 3.5cm.
The volume of cylinder is given by the formula:

The volume of sphere is given by the formula:

There are three(3) spherical balls in the cylinder, thus, the volume of the 3 spherical balls will be:

Hence, the volume of the space inside the cylinder, not filled by the balls is:
