Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Sierpinski-triangle/XPL0/sierpinski-triangle.xpl0
Normal file
13
Task/Sierpinski-triangle/XPL0/sierpinski-triangle.xpl0
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
code ChOut=8, CrLf=9;
|
||||
def Order=4, Size=1<<Order;
|
||||
int S1, S2, I;
|
||||
[S1:= 0; S2:= $8000;
|
||||
for I:= 0 to Size-1 do
|
||||
[S1:= S2;
|
||||
while S2 do
|
||||
[ChOut(0, if S2&1 then ^* else ^ ); S2:= S2>>1];
|
||||
CrLf(0);
|
||||
S2:= S2 xor S1<<1;
|
||||
S2:= S2 xor S1>>1;
|
||||
];
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue