Janholfertmagköln
Aus ProgrammingWiki
Wiki-Quelltext dieser Seite.
<language>Javascript</language>
'''''Diese Seite soll Quadrate zeichnen'''''
----
Wir brauchen ein Zeichenfeld
Wir brauchen den Code für das Zeichnen eines Quadrates
<canvas></canvas>
turtle.home();
<code id="5759262007047">
function Quadrat (a) {
turtle.forward (a);
turtle.left (20);
turtle.forward (a);
turtle.right (20);
turtle.forward (a);
turtle.left (20);
turtle.forward (a);
turtle.right (180);
}
</code>
<run id="57592620070bb">
for (i= 1; i < 13; i++ )
{
Quadrat(20);
}
int fun(int a)
{
int result = 0;
char *buffer = kmalloc(SIZE);
if (buffer == NULL)
return -ENOMEM;
if (condition1) {
while (loop1) {
...
}
result = 1;
goto out;
}
...
out:
kfree(buffer);
return result;
}
</run>