added material
authorChristian Urban <christian dot urban at kcl dot ac dot uk>
Sun, 10 Nov 2013 09:27:01 +0000
changeset 181 1f98d215df71
parent 180 50e8dcd95ae3
child 182 9ce2414e470e
added material
coursework/cw02.pdf
coursework/cw02.tex
hws/hw06.pdf
Binary file coursework/cw02.pdf has changed
--- a/coursework/cw02.tex	Sun Nov 03 11:10:07 2013 +0100
+++ b/coursework/cw02.tex	Sun Nov 10 09:27:01 2013 +0000
@@ -111,7 +111,7 @@
 
 \noindent
 Once you have implemented all regular expressions for 1 - 9, then
-give the token sequence for the Fibonacci program shown below.
+give the token sequence for the Fibonacci program shown below in Fig.~\ref{fib}.
 
 \subsection*{Question 2 (marked with 1\%)}
 
@@ -138,15 +138,19 @@
 and ``three-nested-loops'' program shown below. For example, printing a variable \texttt{x} in the 
 WHILE language can be done by using the command \mbox{\texttt{write x}}. 
 
-
+\begin{figure}[h]
 \begin{center}
 \mbox{\lstinputlisting[language=while]{../progs/fib.while}}
 \end{center}
+\caption{Fibonacci program in the WHILE language.\label{fib}}
+\end{figure}
 
+\begin{figure}[h]
 \begin{center}
 \mbox{\lstinputlisting[language=while]{../progs/loops.while}}
 \end{center}
-
+\caption{The three-nested-loops program in the WHILE language. Usually used for timing measurements.\label{loop}}
+\end{figure}
 
 \end{document}
 
Binary file hws/hw06.pdf has changed