[gnome-university] c101: add a table of operators and what they do.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-university] c101: add a table of operators and what they do.
- Date: Mon, 12 Nov 2012 02:19:15 +0000 (UTC)
commit bb5e480ace291402b0133931b3bca708f944f73d
Author: Christian Hergert <christian hergert me>
Date: Sun Nov 11 18:18:27 2012 -0800
c101: add a table of operators and what they do.
c101/tex/chapter2.tex | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/c101/tex/chapter2.tex b/c101/tex/chapter2.tex
index 95b46a0..fa15604 100644
--- a/c101/tex/chapter2.tex
+++ b/c101/tex/chapter2.tex
@@ -156,6 +156,14 @@ TODO
\item order of operations
\end{itemize}
+\begin{tabular}{c l l}
+\verb|+| & addition of two values & \verb|100 + 20| $\Rightarrow$ \verb|120| \\
+\verb|-| & subtraction of two values & \verb|100 - 20| $\Rightarrow$ \verb|80| \\
+\verb|*| & multiplication of two values & \verb|100 * 20| $\Rightarrow$ \verb|2000| \\
+\verb|/| & division of two values & \verb|100 / 20| $\Rightarrow$ 5 \\
+\verb|%| & remainder of division of two values & \verb|100 % 9| $\Rightarrow$ 1 \\
+\end{tabular}
+
\begin{code}{arithmetic.c}
#include <stdio.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]