For $E \subseteq \mathbb{R}^n$, if every real valued continuous function on $E$ is uniformly continuous, then $E$ is closed and bounded. 
Let $E$ be a subset of Euclidean space $\mathbb{R}^n$. Assume every continuous real-valued function of $E$ is uniformly continuous. Prove that $E$ is closed and bounded.

The preceding exercise asked to show that if $E \subset \mathbb{R}^n$ such that every continuous real valued function on $E$ attains a minimum value, then $E$ is closed and bounded. I solved that by noting that $f(x) = x$ and $f(x) = -x$ both attain minimum values $m$ and $M$, respectively, so $E = [m,M]$ is closed and bounded. However, a similar approach doesn't seem to be working here, and I am not sure in which direction to go.
I have that a metric space is compact if and only if every continuous real-valued function on $X$ takes a maximum and a minimum value, but I'm not sure how to show demonstrate that the premise for the reverse implication holds.

As per Reveillark's comment on the original question, for a limit point $x_0$ of $E$ not in $E$, $1/|x-x_0|$ is continuous but not uniformly continuous, which is a contradiction, so $x_0 \in E$ and $\overline{R} = E$.
For boundedness, $x^2$ is uniformly continuous on every bounded interval but not on an unbounded untercal, so $E$ must be bounded.
