Fibonacci word/fractal: Difference between revisions

→‎{{header|C}}: C -> postscript
(→‎{{header|Ruby}}: Rubyfy and output)
(→‎{{header|C}}: C -> postscript)
Line 89:
Gdip_Shutdown(pToken)
ExitApp</lang>
 
=={{header|C}}==
Writes an EPS file that has the 26th fractal. This is probably cheating.
<lang c>#include <stdio.h>
 
int main(void)
{
puts( "%!PS-Adobe-3.0 EPSF\n"
"%%BoundingBox: -10 -10 400 565\n"
"/a{0 0 moveto 0 .4 translate 0 0 lineto stroke -1 1 scale}def\n"
"/b{a 90 rotate}def");
 
char i;
for (i = 'c'; i <= 'z'; i++)
printf("/%c{%c %c}def\n", i, i-1, i-2);
 
puts("0 setlinewidth z showpage\n%%EOF");
 
return 0;
}</lang>
 
=={{header|C++}}==
Anonymous user