Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,19 @@
integer n = 5
string fmt = sprintf("%%%dd",length(sprintf("%d",n*n)))
integer x = 1, y = 0, c = 0, dx = 0, dy = 1, len = n
sequence m = repeat(repeat("??",n),n)
for i=1 to 2*n do -- 2n runs..
for j=1 to len do -- of a length...
x += dx
y += dy
m[x][y] = sprintf(fmt,c)
c += 1
end for
len -= and_bits(i,1) -- ..-1 every other
{dx,dy} = {dy,-dx} -- in new direction
end for
for i=1 to n do
m[i] = join(m[i])
end for
puts(1,join(m,"\n"))