如何解决问题“巨大的整数类”? [英] how to solve problem"Huge Integer Class"?

查看:88
本文介绍了如何解决问题“巨大的整数类”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是:

创建一个类 HugeInteger ,它使用40个元素的数字数组将整数存储为每个40位数的整数。提供方法输入,输出,添加,减去

如何添加到数组?

the problem is:
Create a class HugeInteger which use 40-element array of digits to store integers as larg as 40 digits each.Provide methods input, output, add, subtract
how to add to arrays ?

推荐答案


问题是:

创建一个类 HugeInteger ,它使用40个元素的数字数组将整数存储为每个40位数的整数。提供方法输入,输出,添加,减去

如何添加到数组?
the problem is:
Create a class HugeInteger which use 40-element array of digits to store integers as larg as 40 digits each.Provide methods input, output, add, subtract
how to add to arrays ?



到目前为止做了什么?

And what have done so far?


我想我可以添加string1和string2的每个数字(字符)彼此相关并将其放在第三个字符串的相同位置,如下所示:
well i thought i can add each digit(character) of the string1 and string2 with eachother and put it in the same position of the third string as shown below:
展开 | 选择 | Wrap | 行号



问题是:

创建一个类 HugeInteger ,它使用40个元素的数字数组来存储整数,每个整数为40个数字。提供方法< b>输入,输出,加,减

如何添加到数组?
the problem is:
Create a class HugeInteger which use 40-element array of digits to store integers as larg as 40 digits each.Provide methods input, output, add, subtract
how to add to arrays ?



40元素阵列是什么类型的?

What type is the 40-element array?


这篇关于如何解决问题“巨大的整数类”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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