Answer:
4.7 × 10¹⁴ g/cm³
Step-by-step explanation:
The mass of the sun (and of the neutron star) is 1.98 × 10³⁰ kg = 1.98 × 10³³ g.
The diameter of the neutron star is 20 km and its radius is 1/2 × 20 km = 10 km = 10⁴ m = 10⁶ cm
If we consider the neutron star to be approximately spherical, we can calculate its volume using the following expression.
V = 4/3 × π × r³
V = 4/3 × π × (10⁶ cm)³
V = 4.19 × 10¹⁸ cm³
The density (ρ) is equal to the quotient between the mass and the volume.
ρ = 1.98 × 10³³ g / 4.19 × 10¹⁸ cm³ = 4.73 × 10¹⁴ g/cm³ ≈ 4.7 × 10¹⁴ g/cm³