Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,32 @@
$ include "seed7_05.s7i";
const func integer: popcount (in integer: n) is
return card(bitset(n));
const proc: main is func
local
var integer: count is 0;
var integer: num is 0;
begin
for num range 0 to 29 do
write(popcount(3 ** num) <& " ");
end for;
writeln;
write("evil: ");
for num range 0 to integer.last until count >= 30 do
if not odd(popcount(num)) then
write(num <& " ");
incr(count);
end if;
end for;
writeln;
write("odious: ");
count := 0;
for num range 0 to integer.last until count >= 30 do
if odd(popcount(num)) then
write(num <& " ");
incr(count);
end if;
end for;
writeln;
end func;