From 96719783cc816904ee0ab6da97fca75539827fd5 Mon Sep 17 00:00:00 2001 From: M33 <327-m33@git.qoto.org> Date: Tue, 30 Mar 2021 20:19:05 +0000 Subject: [PATCH] Add new file --- fizzbuzz-v2.cr | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 fizzbuzz-v2.cr diff --git a/fizzbuzz-v2.cr b/fizzbuzz-v2.cr new file mode 100644 index 0000000..8e483b4 --- /dev/null +++ b/fizzbuzz-v2.cr @@ -0,0 +1,12 @@ +(1..100).each do |i| +if i%15==0 +s="FizzBuzz" +elsif i%3==0 +s="Fizz" +elsif i%5==0 +s="Buzz" +elsif +s=i +end +puts s +end \ No newline at end of file -- GitLab