Solution (source code)

= Solution

Since $\mathbb C$ is <simply connected domain>[simply connected], write
$$
u=\operatorname{Re}f
$$
for an <entire function> $f$. If $u$ were bounded above, then
$$
|e^f|=e^u
$$
would be bounded, so the <Liouville theorem> would make $e^f$ constant. Its derivative $f'e^f$ would then vanish, whence $f$ and $u$ would be constant. Applying the same argument to $e^{-f}$ rules out a lower bound. Thus a nonconstant $u$ is unbounded both above and below.

Given any $c\in\mathbb R$, choose $z_-,z_+\in\mathbb C$ with
$$
u(z_-)<c<u(z_+).
$$
The restriction of $u$ to the line segment from $z_-$ to $z_+$ is <continuous function>[continuous], so the <intermediate value theorem> supplies a point on that segment where $u=c$. Therefore
$$
\boxed{u(\mathbb C)=\mathbb R}.
$$
This proves the <surjectivity of a nonconstant entire harmonic function>.