Skip to content

Commit

Permalink
Merge pull request #1 from chiimmu/develop
Browse files Browse the repository at this point in the history
fizzbuzz added
  • Loading branch information
chiimmu committed Oct 7, 2021
2 parents 42ded1d + 1d267b9 commit e17c8ed
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fizzbuzz.rb
@@ -0,0 +1,16 @@
input = gets
num = input.to_i

(1..num).each do |i|

if i % 15 == 0
puts "FizzBuzz!"
elsif i % 3 == 0
puts "Fizz!"
elsif i % 5 == 0
puts "Buzz!"
else
puts i
end

end

0 comments on commit e17c8ed

Please sign in to comment.