Start out by writing out density as:

(pm) = m / V (pm = density, m = mass, V = volume)

Now we can reaarange this and get that:

m = (pm)*V, then Volume can further be replaced by A*l (where A=area, l=length)

m = (pm)*A*l

solving for A we get:

A = m /(pm)*l

Now write out formula for resistivity,

R = p*l / A (where R=resistance, p=resistivity of material, l=length, A=area)

Substituting the area into this equation we get:

R = (p*l) / (m /(pm)*l) = (p*(pm)*l^2 )/ m

Now we can solve for the length l:

l = squareroot(m*R / p*(pm))

***note that the p should actually be the greek symbol and not p. And also the for the density (pm), the m should be in the the subscript.***

Part B, the diameter can also be determined through manipulating formulas.

begin with volume V,

V = m/(pm)

volume can be replaced by the formula for the area of the cylinder:

pi * r^2 * l = m/(pm)

now replace radius r with diameter d.

r = 1/2 d, so

pi * (1/2 d )^2 * l = m/(pm)

you can also replace length l, with the answer from part A, and get:

pi * (1/2 d )^2 * [squareroot(m*R / p*(pm))] = m/(pm)

now rearrange the equation so you are solving for d:

d = 2 * squareroot( m/(pm)*pi) * [squareroot(m*R / p*(pm))] )

To avoid confusion, this is what the answer should look like(*remember p is actually the greek symbol):