If the side of the square is s, then the diameter and the height of the cylinder are s. And the volume of a cylinder with respect to h and d is:
V=(hπd^2)/4 (because r=d/2 and r^2=d^2/4
Since both d and h are equal to s in this case:
V=(πs^3)/4 and we are told that s=3 so
V=27π/4 in^3
V≈21.21 in^3 (to nearest hundredth)