Let $G$ be an abelian group, $p$ a prime, then $G_p$ is the $p$-primary component of $G$, i.e. $$G_p = \lbrace g \in G \ | \exists \ n \in \mathbb{N} \ , p^ng = 0\rbrace$$
I have to prove that $$\biggl ( \prod_p G_p \biggr) /\biggl( \bigoplus_p G_p\biggr)$$ is torsion-free and divisible.
The torsion-free part is easy, because I've proved that $$\biggl( \bigoplus_p G_p\biggr) = t\biggl ( \prod_p G_p \biggr)$$ $t(\cdot)$ is the torsion part.
How to prove the second point ( divisible ) ?
So, fix an element $g = (g_{p}) \in \prod_{p} G_{p}$ and choose some $n \in \mathbb{N}$.We want to show $g = (g_{p})$ is divisible by $n$. Now, since we can freely add terms with finitely many nonzero elements, we may assume the component of $g$ is zero in the primes that divide $n$. Hence, for each $g_{p} \not = 0$, $p$ is relatively prime to $n$. Thus, since for some $m$, $p^{m}g_{p} = 0$, the order of $g_{p}$, call it $p^{m_{p}}$, is relatively prime to $n$ for each $g_{p} \not = 0.$
We now show that there exists some $h_{p} \in G$ such that $nh_{p} = g_{p}.$ Consider the set of elements $$S = \{ng_{p}, 2ng_{p}, 3ng_{p}\ldots\}.$$ Clearly, the elements in $S$ are divisible by $n$. So, we just need to show that one of the elements in $S$ is $g_{p}$. But that follows from showing that some element in the set $$S' = \{n, 2n, 3n, \ldots\}$$ is $1 \mod p^{m_{p}}.$ This is true because $n$ is invertible $\mod p^{m_{p}}$, as $p$ does not divide $n$. Hence, we have some $kng_{p} = g_{p}$ and hence, if $h_{p} = kg_{p}$, then $nh_{p} = g_{p} \in G$.
Now, define $h = (h_{p}) \in \prod_{p}G_{p}$, where we define $h_{p} = 0$ for the primes $p$ dividing $n$. Then, by the argument in the above paragraph, $nh = g.$