Cantor set: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
m (→{{header|Wren}}: Changed to Wren S/H) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 232:
cantor(inicio, largo, índice)
seg=0
#( seg:=(int(largo/3))), no es cero?, entonces{
}
retornar
Line 253 ⟶ 254:
#include <basico.h>
#define HEIGHT 5
Line 259:
decimales '0'
iterar
iterar grupo ( ++i, #(i< (3^j)),\
#(
#(
mientras ' #(j<=HEIGHT); ++j '
▲ siguiente
▲ imprimir (s, NL)
terminar
Line 1,094 ⟶ 1,092:
{{out}}
Same result of Java
=={{header|EasyLang}}==
[https://easylang.dev/show/#cod=S87PyS9SMDU15Sooyk9WSE7MKwHyKxQqFYqrFPQU9LgUFBQy00AcOwUDPUMQFwiKq4wVbEGC+grGUKHc/LJUsD5dkCxUsCg1uQSkDCGCZAFYITYpbQUjBS2wJJoiPS49LqgqAwULAwVDAwMuAA== Run it]
<syntaxhighlight>
color 555
proc cantor x y sz . .
if sz > 0.1
sz3 = sz / 3
move x y - sz3
rect sz sz3
cantor x y - sz3 sz3
cantor x + 2 * sz3 y - sz3 sz3
.
.
cantor 0 80 100
</syntaxhighlight>
=={{header|Elixir}}==
Line 4,340 ⟶ 4,356:
=={{header|Wren}}==
{{trans|Kotlin}}
<syntaxhighlight lang="
var height = 5
|