\begin{frame}[fragile,t]{Programs {\tt Fac1}, {\tt Fac2}}
The \emph{factorial} $\forestgreen{n}$ of a natural number $\forestgreen{n}$ is defined inductively by:
\begin{talign}
\fac{0} &\defdby 1 \\
\fac{(\forestgreen{n}+1)} &\defdby (\forestgreen{n}+1) \cdot \fac{\forestgreen{n}}
\end{talign}
\begin{center}
\begin{minipage}{0.45\textwidth}
\begin{exampleblock}{Program {\tt Fac1}}
\begin{lstlisting}
y = 1;
z = 0;
while (z != x) {
z = z + 1;
y = y * z;
}
\end{lstlisting}
\end{exampleblock}
\end{minipage}
\pause\hspace*{3ex}
\begin{minipage}{0.45\textwidth}
\begin{exampleblock}{Program {\tt Fac2}}
\begin{lstlisting}
y = 1;
while (x != 0) {
y = x * y;
x = x - 1;
}
\end{lstlisting}
\end{exampleblock}
\end{minipage}
\end{center}
\end{frame}