For this case we have that by definition, the volume of a cylinder is given in the following way:

Where:
V: Represents the volume
r: Represents the radius of each of the circular caps of the cylinder
h: Represents the height of the cylinder
IF the diameter is 6, then:
Then, according to the given data we have:

Substituting:

So, the volume of the cylinder is
Answer:
The volume of the cylinder is
cubic units