Initial commit
This commit is contained in:
13
bash/raindrops/raindrops.sh
Normal file
13
bash/raindrops/raindrops.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NUM=$1
|
||||
ans=""
|
||||
[ $(( NUM % 3 )) -eq 0 ] && ans+="Pling"
|
||||
[ $(( NUM % 5 )) -eq 0 ] && ans+="Plang"
|
||||
[ $(( NUM % 7 )) -eq 0 ] && ans+="Plong"
|
||||
|
||||
if [[ $ans == "" ]]; then
|
||||
echo $1
|
||||
else
|
||||
echo $ans
|
||||
fi
|
||||
Reference in New Issue
Block a user