如何只显示大数位的乘法? [英] How to show the multiplication in digit only of large number?
本文介绍了如何只显示大数位的乘法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
假设
Ex.: 666666666666666666666666666666666666666666666666666 * 66666666666666666666666666666666666666666666666666666666 =
该值只能为数字.不允许
Exponential
值.
感谢
解决方案
使用.NET Framework v.4.0中首次引入的新类型System.Numerics.BigInteger
: ^ ].
—SA
正如SA所说,BigInteger将解决此问题.但是,如果您不使用.NET Framework 4,或者这是您的家庭作业,并且不允许使用BigInteger,您仍然可以通过长乘法以老式的方式进行操作-这是您上学时所教的方法! /blockquote>
Hi all,
SupposeEx.: 666666666666666666666666666666666666666666666666666 * 66666666666666666666666666666666666666666666666666666666 =
The value should be in digits only.NoExponentialvalues allowed.
Thanks解决方案Use the new typeSystem.Numerics.BigInteger
first introduced in .NET Framework v.4.0: http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx[^].
—SA
As SA says, the BigInteger will handle the problem. However, if you are not using .NET framework 4, or this is your homework and you are not allowed to use BigInteger, you can still do it the old fashioned way via long multiplication - the way you were taught when you started school!
这篇关于如何只显示大数位的乘法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文