numof 1 bits in 0 to 255 by *yuko*

program-id.y.data division.working-storage section.
1 i pic 999.
1.
2 n pic 9 occurs 256.procedure division.a.add 1 to i
display n(i)no advancing
compute n(1+i)=n(1+i/2)+function mod(i,2)go a.

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page