The volume of a cylinder with the radius r and height h can be calculated by the following formula.
V=π r^2 h
We are given the diameter of the cylinder. Let's recall the relation between the diameter and radius of a circle.
d=2r
We can substitute the diameter into the formula and calculate r.