Based on what I am seeing, it appears that you would begin with the formula D = M/V. (Density=Mass/Volume). That would give you 0.784 = 18.73 / Volume. That calculation would give you the volume.
It seems that you would then use the formula for the cylinder. That would be V = pi r squared h (where volume = 22/7 x radius squared x height). So your answer for the first calculation (in paragraph 1) would be = to 22/7 x r squared x 20. (The 20 would be considered the given length) You would solve for the radius, and then double that to get the diameter.