-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexam.tex
61 lines (45 loc) · 1 KB
/
exam.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
\documentclass{ituhandin}
\coursename{Course name}
\fullname{Your name}
\when{January 2016}
\initials{init}
\coursecode{Course code}
\begin{document}
%\includepdf{frontpage.pdf}
\maketitlepage{}
\signpage{}
\chapter{}
This is code in a box
\begin{lstlisting}[language=C, caption=This is a caption]
void fac(int n, int *res) {
if (n == 0) /* fac's n */
*res = 1;
else {
int tmp;
fac(n-1, &tmp);
*res = tmp * n;
}
}
\end{lstlisting}
This is code in the free
\begin{lstlisting}[language=ML, frame={}]
let rec lookup env x =
match env with
| [] -> failwith (x + " not found")
| (y, v)::r -> if x=y then v else lookup r x;;
type expr =
| CstI of int
| Var of string
| Prim of string * expr * expr;;
\end{lstlisting}
Happy exam!
\chapter{}
\section{}
\section{}
\bibliographystyle{plainnat}
\bibliography{bibliography}
\styleAppendix{}
\appendix
\chapter{Some code}
\label{LastPage}
\end{document}