TITLE: Homology and cohomology of 7-manifold
QUESTION [10 upvotes]: I have the following problem:

Let $M$ be a connected closed $7$-manifold such that $H_1(M,\mathbb{Z}) = 0$, $H_2(M,\mathbb{Z}) = \mathbb{Z}$, $H_3(M,\mathbb{Z}) = \mathbb{Z}/2$. Compute
  $H_i(M,\mathbb{Z})$ and $H^i(M,\mathbb{Z})$ for all $i$.

I know that if $M$ is orientable, using Poincaré duality, the fact that $\chi(M)=0$ and the exact sequence for $H^i(M,\mathbb{Z})$ I can get the result.
But, I don't know how to prove that $M$ is orientable. I know that is the case if $M$ does not have $2$-torsion on $\pi_1(M)$, but I don't see why this $2$-torsion should descend to $H_1(M)$.

REPLY [4 votes]: A quick proof using Stiefel–Whitney classes: a manifold $M$ is orientable iff the first SW class $w_1(M) \in H^1(M;\mathbb{Z}/2\mathbb{Z})$ is zero. But by the universal coefficient theorem,
$$H^1(M;\mathbb{Z}/2\mathbb{Z}) = \operatorname{Hom}_\mathbb{Z}(H_1(M;\mathbb{Z}), \mathbb{Z}/2\mathbb{Z}) = 0.$$
Of course under the hood I don't think there's anything more than what you can find in Eric Wofsey's answer, but this argument is quite simple and shows the power of characteristic classes.