marking1/collatz_test1.scala
author Christian Urban <urbanc@in.tum.de>
Fri, 30 Nov 2018 08:56:22 +0000
changeset 225 56732dbefcff
parent 210 63a1376cbebd
child 266 ca48ac1d3c3e
permissions -rw-r--r--
added pdfs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     3
assert(collatz(1) == 0)
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     4
assert(collatz(6) == 8)
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     5
assert(collatz(9) == 19)
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     6
assert(collatz(9000) == 47)
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8