mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
Cut (Prolog) hinzugefügt; weitere Scala-Beispiele hinzugefügt
This commit is contained in:
parent
6829f6cf97
commit
20994f6cc3
7 changed files with 101 additions and 1 deletions
|
@ -160,6 +160,28 @@ man immer wieder Quadriert:
|
|||
|
||||
\inputminted[linenos, numbersep=5pt, tabsize=4, frame=lines, label=power-futures.scala]{scala}{scripts/scala/power-futures.scala}
|
||||
|
||||
\subsection{Coffeetime 01: Two Bases}
|
||||
Find three digits $X$, $Y$ and $Z$ such that $XYZ$ in base 10 is equal to $ZYX$
|
||||
in base 9.
|
||||
|
||||
\inputminted[linenos, numbersep=5pt, tabsize=2, frame=lines, label=01-TwoBases.scala]{scala}{scripts/scala/01-TwoBases.scala}
|
||||
|
||||
\subsection{Coffeetime 04: Exactly a third}
|
||||
Arrange the numerals 1-9 into a single fraction that equals exactly
|
||||
$\frac{1}{3}$.
|
||||
|
||||
No other math symbols wanted; just concatenation some digits for the
|
||||
numerator, and some to make a denominator.
|
||||
|
||||
\inputminted[linenos, numbersep=5pt, tabsize=4, frame=lines, label=04-ExactlyAThird.scala]{scala}{scripts/scala/04-ExactlyAThird.scala}
|
||||
|
||||
\subsection{Coffeetime 05: Three Dice}\xindex{yield (Scala)@\texttt{yield} (Scala)}
|
||||
I roll three dice, and multiply the three numbers together.
|
||||
|
||||
What is the probability the total will be odd?
|
||||
|
||||
\inputminted[linenos, numbersep=5pt, tabsize=4, frame=lines, label=05-ThreeDice.scala]{scala}{scripts/scala/05-ThreeDice.scala}
|
||||
|
||||
\section{Weitere Informationen}
|
||||
\begin{itemize}
|
||||
\item \url{http://www.scala-lang.org/api}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue