# HG changeset patch # User Christian Urban # Date 1701171948 0 # Node ID ae365699ef4854dd0b8867e619a46219a7883456 # Parent ca67172b8fa118cfc9810e5d3d631798eb1f582a updated diff -r ca67172b8fa1 -r ae365699ef48 hws/hw01.pdf Binary file hws/hw01.pdf has changed diff -r ca67172b8fa1 -r ae365699ef48 hws/hw02.pdf Binary file hws/hw02.pdf has changed diff -r ca67172b8fa1 -r ae365699ef48 hws/hw03.pdf Binary file hws/hw03.pdf has changed diff -r ca67172b8fa1 -r ae365699ef48 hws/hw04.pdf Binary file hws/hw04.pdf has changed diff -r ca67172b8fa1 -r ae365699ef48 hws/hw05.pdf Binary file hws/hw05.pdf has changed diff -r ca67172b8fa1 -r ae365699ef48 hws/hw06.pdf Binary file hws/hw06.pdf has changed diff -r ca67172b8fa1 -r ae365699ef48 hws/hw07.pdf Binary file hws/hw07.pdf has changed diff -r ca67172b8fa1 -r ae365699ef48 hws/hw08.pdf Binary file hws/hw08.pdf has changed diff -r ca67172b8fa1 -r ae365699ef48 hws/hw08.tex --- 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? diff -r ca67172b8fa1 -r ae365699ef48 hws/hw09.pdf Binary file hws/hw09.pdf has changed