プログラミングのお題スレ Part13at TECH
プログラミングのお題スレ Part13 - 暇つぶし2ch770:ingStartWith: $0) reversed asArray collect: #asString]. interms := (digits reduce: #+) collectWithIndex: [:interm :idx | interm, (String new: idx-1 withAll: Character space)]. ans := interms polynomialEval: '10'. strings atLast: 1 put: '+ ', strings last. max := ((strings, {ans}) collect: #size) max. line := String new: max withAll: $-. (strings, {line}, interms, {line. ans} collect: [:str | (str forceTo: max paddingStartWith: Character space) withoutTrailingBlanks ]) asStringWithCr ]. fn value: 987 value: 65. "=> ' 987 + 65 ---- 12 14 9 ---- 1052' "




次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch