Hi,for this question I can visualize what it is asking but I'm having troubles writing a formal proof for it.

I was thinking of applying the intermediate value theorem to g(x) = f(x) - x, but I just keep getting stuck.Suppose that $\displaystyle f$ is continuous on the closed interval [0,1] and that $\displaystyle 0 \leq f(x) \leq1$ for every $\displaystyle x$ in [0,1]. Show that there exists a real number $\displaystyle c \in [0,1]$ such that $\displaystyle f(c) = c.$

Any help will be highly appreciated