Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/Cantor-set/XPL0/cantor-set.xpl0
Normal file
19
Task/Cantor-set/XPL0/cantor-set.xpl0
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
proc Cantor(N, LineSeg, Len); \Delete middle third of LineSeg
|
||||
int N; char LineSeg; int Len, Third, I;
|
||||
[if N>0 and Len>1 then
|
||||
[Third:= Len/3;
|
||||
for I:= Third, 2*Third-1 do LineSeg(I):= ^ ;
|
||||
Cantor(N-1, LineSeg, Third);
|
||||
Cantor(N-1, LineSeg+2*Third, Third);
|
||||
];
|
||||
];
|
||||
|
||||
char LineSeg, N;
|
||||
[LineSeg:=
|
||||
"#################################################################################
|
||||
";
|
||||
for N:= 0 to 4 do
|
||||
[Cantor(N, LineSeg, 81);
|
||||
Text(0, LineSeg);
|
||||
];
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue