pouët.net

Go to bottom

Christmas Diamonds

philippus_vccc_2023_scala

Author: Philippus Baalman (github.com/philippus)
Category: Christmas Challenge
System:   PC
Language: Scala 2.13
Len source code: 107 bytes
Len exe file:    n.a.
Len code only:   n.a.
Instructions:
install scala-cli (https://scala-cli.virtuslab.org/)
run "scala-cli vccc2023.sc"
Description:
The code uses:
- "multiplying" strings using "*", with this technique, f.e. ``" "*4` is smaller than ``"    "`.
- assigning multiple variables at once, saving precious `val`s.
- a sequence of the different lines, using the created strings.
- a for loop with modulo to print the sequence 3 times, plus the first line one time more.
Comments:
Merry Christmas and a happy new year!
Go to top