存储一个两千位数的数字 [英] storing a two thousand digit number

查看:74
本文介绍了存储一个两千位数的数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在asp.net中存储两个不同的千位数,并且存储后,我还想将这两个数字彼此相乘并将结果存储在第三个int中,请有人告诉我有关该

i want to store two different thousand digit number in asp.net and after storing i also want to multiply this two numbers with each other and store the result in third int,someone please give me any idea on that

推荐答案

这是您想要的吗?

is this what you want?

int value1 = 1000;
int value2 = 2000;

int value3 = value1 * value2;


随时提出问题


feel free to ask question


您需要自己编写一些代码才能做到这一点.存储值并不重要,因为无论如何您都需要以字符串格式保存数字.但是,乘法运算会有些麻烦,因为您最终要存储一个很大的值.
You would need to write some code for yourself to do this. Storing the value is no big deal as you need to hold the number in string format anyway. However multiplying becomes a bit of a pain as you would end up with quite a large value to store.


这篇关于存储一个两千位数的数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆