有什么可以帮助我解决这个问题的? [英] can some when helpe me with this qustion?

查看:76
本文介绍了有什么可以帮助我解决这个问题的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第1部分:根据
开发一个类来表示一个大整数 以下规格:
·大整数表示为数字的动态数组,其中每个
digit是0到9之间的整数.例如,如果472389是big
整数,则其动态数组表示将如
所示 图1.请注意,最低有效数字在位置
动态数组的数字0.
i:0 1 2 3 4 5
A [i]:9 8 3 2 7 4
图1:大整数472389的动态数组表示形式
·提供以下功能:
o具有可初始化big
的字符串参数的构造函数 字符串参数的数字的整数对象.你应该
使用空字符串的默认参数表示整数
零.
o在屏幕上显示大整数的功能
o检查此大整数是否等于另一个大整数的函数
作为参数传递的整数.
o将一个大整数复制到另一个大整数的功能.
o名为add的函数会将参数添加到此big
整数.
o一个称为减法的函数,它将减去参数
从大整数开始.
·请注意,当您添加/减去数字时,您需要通过
添加/减去数字 数字并使用进位/借位完成操作.
·您可以在类中添加任何数据或函数成员.
第2部分:编写一个客户端程序,该程序将使用大整数类来开发一个
斐波那契数字计算器.该程序应询问用户什么
您要计算斐波那契数",然后显示正确的
以下斐波那契数列中的斐波那契数:
1 1 2 3 5 8 13 21 34 55 89 144 . .
例如,斐波那契数字1是1,而斐波那契数字10是55
等等.
Deliv

Part 1: Develop a class to represent a big integer number according to the
following specifications:
· A big integer is represented as a dynamic array of digits where each
digit is an integer between 0 and 9. For example if 472389 is a big
integer then its dynamic array representation will be as illustrated in
Figure 1. Please note that the least significant digit is at position
number 0 of the dynamic array.
i: 0 1 2 3 4 5
A[i]: 9 8 3 2 7 4
Figure 1: Dynamic array representation of the big integer 472389
· Provide the following functions:
o A constructor with a string parameter that initializes a big
integer object to the digits of the string parameter. You should
use a default parameter of empty string to represent the integer
zero.
o A function that display a big integer on the screen
o A function to check if this big integer is equal to another big
integer passed as a parameter.
o A function to copy one big integer into another.
o A function called add that will add the parameter to this big
integer.
o A function called subtract that will subtract the the parameter
from the big integer.
· Notice that when you add/subtract you need to add/subtract digit by
digit and use carry/borrow to complete the operation.
· You may add any data or function members to your class.
Part2: Write a client program that will use the big integer class to develop a
Fibonacci numbers calculator. The program should ask the user "what
Fibonacci number would you like to compute" and then display the correct
Fibonacci number in the following Fibonacci series:
1 1 2 3 5 8 13 21 34 55 89 144 . . .
For example the Fibonacci number 1 is 1 and the Fibonacci number 10 is 55
and so on.
Deliv

推荐答案

简短答案:否.
长答案:去做更多的用户指南和课程笔记研究,然后自己动手做.如果您提出一个合理的技术问题,那么人们会尽力帮助您,但没人会帮您完成所有工作.
Short answer: No.
Long answer: Go and do some more studying of your user guides and course notes and start working on this for yourself. If you come up with a single reasonable technical question then people will try to help you, but nobody is going to do all your work for you.


我们不做您的作业:设置是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试,您可能会发现它并不像您想的那么困难!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!


这篇关于有什么可以帮助我解决这个问题的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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