Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Anti-primes/XPL0/anti-primes.xpl0
Normal file
18
Task/Anti-primes/XPL0/anti-primes.xpl0
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
int Counter, Num, Cnt, Div, Max;
|
||||
[Counter:= 0;
|
||||
Max:= 0;
|
||||
Num:= 1;
|
||||
loop [Cnt:= 0;
|
||||
Div:= 1;
|
||||
repeat if rem(Num/Div) = 0 then Cnt:= Cnt+1;
|
||||
Div:= Div+1;
|
||||
until Div > Num;
|
||||
if Cnt > Max then
|
||||
[IntOut(0, Num); ChOut(0, ^ );
|
||||
Max:= Cnt;
|
||||
Counter:= Counter+1;
|
||||
if Counter >= 20 then quit;
|
||||
];
|
||||
Num:= Num+1;
|
||||
];
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue