-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddsi.tex
55 lines (46 loc) · 1.38 KB
/
addsi.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
\documentclass[12pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\usepackage{tikz}
\title{Adding and subtracting signed integers}
\author{Leomar Dur\'an}
\date{24\(^{\text{th}}\) November 2019}
\begin{document}
\thispagestyle{empty}
\newcounter{randtwo}
\begin{enumerate}
\foreach \k in {1,...,108}{
\item
\pgfmathparse{random(2)}
\setcounter{randtwo}{\pgfmathresult}
\ifnum\therandtwo=1
Compute:
\else
Evaluate:
\fi
\(
\pgfmathparse{int(random(0,18)-9)}
\pgfmathresult
\pgfmathparse{random(2)}
\setcounter{randtwo}{\pgfmathresult}
\ifnum\therandtwo=1
+
\else
-
\fi
\pgfmathparse{random(2)}
\setcounter{randtwo}{\pgfmathresult}
\ifnum\therandtwo=1
\pgfmathparse{random(9)}
\pgfmathresult
\else
\left(
-\pgfmathparse{random(9)}
\pgfmathresult
\right)
\fi
\)
}
\end{enumerate}
\end{document}