プログラミングのお題スレ 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