|
@@ -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}
|
|
\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}
|
|
\section{Weitere Informationen}
|
|
\begin{itemize}
|
|
\begin{itemize}
|
|
\item \url{http://www.scala-lang.org/api}
|
|
\item \url{http://www.scala-lang.org/api}
|