(i) Let $M\in\mathbb{R}$ and assume that $f(c)>M$. Show that $\exists \delta>0$ with the property that $\frac{f(c)+M}{2}<f(x), \, \, \forall x \in [a,b]$ such that $|x-c|< \delta$
(ii) Give an example showing that the statement in (i) is false if $f$ is not continuous. Justify your answer.
Now I've already shown part (i) to be true by using the $\epsilon-\delta$ definition of continuity at $c$ and setting $\epsilon = \frac{f(c)-M}{2}$. However, I'm not too sure about how I can go about tackling part (ii).
Any guidance would be appreciated.
Take $M=1$, $c=0$, and$$\begin{array}{rccc}f\colon&[-1,1]&\longrightarrow&\mathbb R\\&x&\mapsto&\begin{cases}2&\text{ if }x=0\\0&\text{ otherwise.}\end{cases}\end{array}$$Then $f(c)>M$, but there is no $\delta>0$ with the property that you mentioned.