You are here: Home Blog Comments [Smalltalk][OOPL] 100までの整数から素数を列挙せよ…を Smalltalk-76 で

Personal tools

[Smalltalk][OOPL] 100までの整数から素数を列挙せよ…を Smalltalk-76 で

Posted by sumim’s smalltalking-tos at 2006-06-17 16:16
1977 年から、時空を越えてのエントリー。w ”Smalltalk-76” limit ← 100. primes ← #() asStream. primes next ← 2. for% i from: (3 to: limit by: 2) do% [ isprime ← true. for% prime from: primes contents do% [ i ¥ prime = 0 ? [isprime ← false]]. ispri
Parent entry キミならどう書く 2.0 - ROUND 1 -