Created
January 6, 2015 23:13
-
-
Save anonymous/0ca762a4da36a1c53f86 to your computer and use it in GitHub Desktop.
something involving division and possibly case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
for x in {1..100} | |
do if (( $x % 3 == 0)) && (( $x % 5 == 0 )) | |
then echo fizzbuzz | |
elif (( $x % 3 == 0 )) | |
then echo fizz | |
elif (( $x % 5 == 0 )) | |
then echo buzz | |
else echo "$x" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment