I am preparing a presentation in which I want to display the following as it is
\begin{verbatim}
foo
\end{verbatim}
For this I used
\begin{verbatim}
\begin{verbatim}
foo
\end{verbatim}
\end{verbatim}
But the first \end{verbatim}
ends the environment and the second induces error. Can anyone suggest how to do this?
I should appreciate the explanation of the trick and commands suggested.