Add langs Cherrycake and Insitux

This commit is contained in:
Ingy döt Net 2023-07-18 13:56:46 -07:00
parent 633b36288a
commit 9817d9b99b
36 changed files with 132 additions and 0 deletions

View file

@ -0,0 +1,20 @@
# Route with custom number of iterations
cached get ~/:n {
# Get the Number of Iterations from the URL Params
int n = req.params.n || 100
# Loop through each iteration
for (i in range(n)) {
if (i % 2 == 0 && i % 3 == 0) { res.write("FizzBuzz\n") continue }
if (i % 2 == 0) { res.write("Fizz\n"); continue; }
if (i % 3 == 0) { res.write("Buzz\n"); continue; }
res.write(i + "\n");
}
# Close the connection
res.end();
}