Step 1: Find oxidation state and electronic configuration of Co.
Cobalt (Z = 27):
\[
Co: [Ar]\,3d^7\,4s^2
\]
Step 2: For \([Co(NH_3)_6]^{3+\).}
Oxidation state of Co is \(+3\).
\[
Co^{3+}: [Ar]\,3d^6
\]
NH\(_3\) is a strong field ligand, so it causes pairing (low spin).
So \(d^6\) in octahedral low spin:
\[
t_{2g}^6 e_g^0
\]
Unpaired electrons = \(0\).
Step 3: For \([CoF_6]^{3-}\).
Let oxidation state of Co be \(x\).
\[
x + 6(-1) = -3
\Rightarrow x = +3
\]
So again \(Co^{3+}: 3d^6\).
F\(^-\) is a weak field ligand, so complex is high spin.
In high spin octahedral \(d^6\):
\[
t_{2g}^4 e_g^2
\]
Unpaired electrons = \(4\).
Step 4: Final conclusion.
So unpaired electrons are \(0\) and \(4\).
Final Answer:
\[
\boxed{\text{(D) 0 and 4}}
\]