Skip to content
Snippets Groups Projects
Commit 0aca7a6d authored by Stefan Gehr's avatar Stefan Gehr
Browse files

fixing latex errors

parent 76480158
Branches
No related tags found
No related merge requests found
Pipeline #90187 passed
......@@ -104,7 +104,7 @@ So ``eins'' for \(d=1\), ``zwei'' for \(d=2\), and so on.
Then for a few special cases we needed to create the function
sayPreNumber(\(n\)) that only says ``ein'' instead of ``eins'' for \(n=1\) and just calls our normal sayNumber(\(n\)) function otherwise.
This is necessary for cases like \(n=31\) which is read as ``EINunddreißig'' instead of ``EINSunddreißig''.
Another special fucntion is sayAftNumber(\(n\)) which only our normal sayNumber(\(\n\)) function if \(n\ne 0\).
Another special fucntion is sayAftNumber(\(n\)) which only our normal sayNumber(\(n\)) function if \(n \ne 0\).
It is necessary for numbers like 100, 200, 300, \dots,
as we want to say ``zweihundert'' for \(n=200\) and not ``zweihundertnull''.
\begin{algorithm}
......@@ -150,8 +150,9 @@ as we want to say ``zweihundert'' for \(n=200\) and not ``zweihundertnull''.
\Comment{3-digit number}
\State hundreds \(\gets \lfloor n / 100 \rfloor\)
\State sayPreNumber(hundreds)
\State sayAftNumber(\(n - 100 \times \text{hundreds}\)
\State sayAftNumber(\(n - 100 \times \text{hundreds}\))
\EndIf
\EndFunction
\end{algorithmic}
\end{algorithm}
Finally our main function sayNumber(\(n\)) goes thorugh all the possible cases.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment