Finding a continuous function $f: \mathbb{R} \to \mathbb{R}$ such that $f(\mathbb{R})$ is neither open nor closed Find a bounded, continuous function $f: \mathbb{R} \to \mathbb{R}$ such that $f(\mathbb{R})$ is neither open nor closed?

Take $f(x):=e^{-x^2}$: it's a continuous bounded function on the real line, and $f(\Bbb R)=(0,1]$, which is neither open nor closed.
