完全不受视觉化与ASCII艺术的长期划分的启发;)
您的工作是要用ASCII艺术表现出长手的加法。您可以通过将列从右到左相加,将那些位置的值放在结果中,然后将十位数移到下一列的顶部来解决长期累加问题。
输入值
输入只要输入2到9个数字,基本上就可以采用您想要的任何格式。
输出量
此处的格式可能与您在学校学习的方式相符:
carry row
number1
number2
...
+ numX
--------
result
您可以在此处拥有几乎任何数量的尾随空白;)
例子
50, 50
1
50
+50
---
100
1651, 9879
1111
1651
+9879
-----
11530
6489789, 9874, 287
1122
6489789
9874
+ 287
--------
6499950
用ASCII艺术可视化长时间的减法:在6个月内直接出现
—
CalculatorFeline
不完全是,它在我的名单上;)
—
J Atkin
实际上,我被教导要把进位行置于结果之下。
—
尼尔
我们应该如何处理
—
Downgoat
9+9+9+9+9+9+9+9+9+9+9+9+9
?
@Downgoat ...
—
PurkkaKoodari
you take from 2 to 9 numbers as input
...