From 1a58f3b7afa93306d847af4f58626dd31b7ffaa6 Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 12 May 2018 13:53:10 -0700 Subject: [PATCH] Add fizzbuzz source Next goal will be, to implement enough to make this work --- source_files/schala/fizzbuzz.schala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 source_files/schala/fizzbuzz.schala diff --git a/source_files/schala/fizzbuzz.schala b/source_files/schala/fizzbuzz.schala new file mode 100644 index 0000000..fe62f04 --- /dev/null +++ b/source_files/schala/fizzbuzz.schala @@ -0,0 +1,12 @@ + +for n <- 1..=100 { + if n % 15 == 0 { + print("FizzBuzz") + } else if n % 5 == 0 { + print("Buzz") + } else if n % 3 == 0 { + print("Fizz") + } else { + print(n.to_string()) + } +}