Some solutions for the julia path
This commit is contained in:
16
julia/raindrops/raindrops.jl
Normal file
16
julia/raindrops/raindrops.jl
Normal file
@@ -0,0 +1,16 @@
|
||||
function raindrops(number)
|
||||
res = ""
|
||||
if number % 3 == 0
|
||||
res *= "Pling"
|
||||
end
|
||||
if number % 5 == 0
|
||||
res *= "Plang"
|
||||
end
|
||||
if number % 7 == 0
|
||||
res *= "Plong"
|
||||
end
|
||||
if number % 3 != 0 && number % 5 != 0 && number % 7 != 0
|
||||
res *= string(number)
|
||||
end
|
||||
return res
|
||||
end
|
||||
Reference in New Issue
Block a user