我想用 bf 读取任意位数的数字。如果我手动设置,我知道如何读取正确的位数,如下所示:
,>,>, 2 Read in 3 digits
<< 0
--------
--------
--------
--------
--------
-------- 45 decrements
> 1
--------
--------
--------
--------
--------
--------
> 2
--------
--------
--------
--------
--------
--------
[>+<-]< 1 Copy digit 3 to cell 3
[>>++++++++++<<-]< Copy 10 * digit 2 to cell 3
Copy 100 * digit 1 to cell 3
[>>>>++++++++++ 4
[<++++++++++>-] 4
<<<<-]>>> 3
>++++++++++..< Add 2 line breaks
., Print and Pause
但我宁愿能够设置一个数字,cell 0
然后为每个数字自动乘以正确的次数。我最好做什么?