RosettaCodeData/Task/Population-count/Symsyn/population-count.symsyn

50 lines
565 B
Plaintext

| Pop Count 3^i
i
if i < 30
(3^i) x
popcount x 63 x
~ x $r
+ $r $s
+ ' ' $s
+ i
goif
endif
"' Pop Count 3^i : ' $s " []
| Evil Numbers
i
cnt
if cnt < 30
popcount i 7 x
x:0:1 y
if y <> 1
+ cnt
~ i $r
+ $r $e
+ ' ' $e
endif
+ i
goif
endif
"' Evil Numbers : ' $e " []
| Odious Numbers
i
cnt
if cnt < 30
popcount i 7 x
x:0:1 y
if y = 1
+ cnt
~ i $r
+ $r $o
+ ' ' $o
endif
+ i
goif
endif
"' Odious Numbers : ' $o " []