Created
May 28, 2014 14:46
-
-
Save caschwartz/b4063c6f68ce3eb7ed28 to your computer and use it in GitHub Desktop.
FizzBuzz in XQuery
This file contains hidden or 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
| xquery version "1.0-ml"; | |
| (: FizzBuzz puzzle :) | |
| for $num in (1 to 100) | |
| return | |
| if ($num mod 3 = 0 and $num mod 5 = 0) then | |
| "FizzBuzz" | |
| else if ($num mod 3 = 0) then | |
| "Fizz" | |
| else if ($num mod 5 = 0) then | |
| "Buzz" | |
| else $num | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment