hws/hw08.tex
changeset 957 34b3aeb65fbe
parent 956 ae9782e62bdd
--- a/hws/hw08.tex	Tue Nov 28 11:42:31 2023 +0000
+++ b/hws/hw08.tex	Tue Nov 28 11:45:48 2023 +0000
@@ -13,18 +13,18 @@
 \item Write a program in the WHILE-language that calculates
   the factorial function.
 
-\begin{lstlisting}
-write "factorial: ";
-read n;
-minus1 := 1;
-while n > 0 do {
-minus1 := minus1 * n;
-n := n - 1
-};
-write "Result: ";
-write minus1 ;
-write "\n"
-\end{lstlisting}
+%\begin{lstlisting}
+%write "factorial: ";
+%read n;
+%minus1 := 1;
+%while n > 0 do {
+%minus1 := minus1 * n;
+%n := n - 1
+%};
+%write "Result: ";
+%write minus1 ;
+%write "\n"
+%\end{lstlisting}
 
 \item What optimisations could a compiler perform when
   compiling a WHILE-program?