文件名称:HugeInteger
- 所属分类:
- Windows编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 367kb
- 下载次数:
- 0次
- 提 供 者:
- 肖*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
将整数的各个数位存储为一个长度为四十的字符数组中各个元素。能够进行四十位的整数的加减法-Create a class HugeInteger that uses a 40-element array of digits to store integers as
large as 40 digits each (e.g. 8783 is stored as an array of {3,8,7,8,0,0,0,....} ), and use another
boolean member to denote whether it is positive or negative. .
a. Provide member functions input, output, add,substract. Check if these
operations cause overfl ow, i.e. larger than 40 digits, or underfl ow, i.e. less than 0.
b. For comparing HugeInteger objects, provide functions isEqualTo, isNotEqualTo,
isGreaterThan, isLessThan, isGreaterThanOrEqualTo and
isLessThanOrEqualTo-- each of these is a predicate function that simply returns
true if the relation holds between two huge integers and returns false otherwise.
c. Also provide a predicate function isZero.
d. Write a driver program to test class HugeInteger.
large as 40 digits each (e.g. 8783 is stored as an array of {3,8,7,8,0,0,0,....} ), and use another
boolean member to denote whether it is positive or negative. .
a. Provide member functions input, output, add,substract. Check if these
operations cause overfl ow, i.e. larger than 40 digits, or underfl ow, i.e. less than 0.
b. For comparing HugeInteger objects, provide functions isEqualTo, isNotEqualTo,
isGreaterThan, isLessThan, isGreaterThanOrEqualTo and
isLessThanOrEqualTo-- each of these is a predicate function that simply returns
true if the relation holds between two huge integers and returns false otherwise.
c. Also provide a predicate function isZero.
d. Write a driver program to test class HugeInteger.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
HugeInteger\debug\HugeInteger.exe
...........\HugeInteger\Debug\BuildLog.htm
...........\...........\.....\HugeInteger.exe.intermediate.manifest
...........\...........\.....\Implementation.obj
...........\...........\.....\Implemention.obj
...........\...........\.....\mt.dep
...........\...........\.....\Test.obj
...........\...........\.....\vc80.idb
...........\...........\HugeInteger.h
...........\...........\HugeInteger.vcproj
...........\...........\HugeInteger.vcproj.PC-201103072012.Administrator.user
...........\...........\HugeInteger.vcproj.XIAOXIN.Administrator.user
...........\...........\Implementation.cpp
...........\...........\Test.cpp
...........\HugeInteger.ncb
...........\HugeInteger.sln
...........\HugeInteger.suo
...........\...........\Debug
...........\debug
...........\HugeInteger
HugeInteger
...........\HugeInteger\Debug\BuildLog.htm
...........\...........\.....\HugeInteger.exe.intermediate.manifest
...........\...........\.....\Implementation.obj
...........\...........\.....\Implemention.obj
...........\...........\.....\mt.dep
...........\...........\.....\Test.obj
...........\...........\.....\vc80.idb
...........\...........\HugeInteger.h
...........\...........\HugeInteger.vcproj
...........\...........\HugeInteger.vcproj.PC-201103072012.Administrator.user
...........\...........\HugeInteger.vcproj.XIAOXIN.Administrator.user
...........\...........\Implementation.cpp
...........\...........\Test.cpp
...........\HugeInteger.ncb
...........\HugeInteger.sln
...........\HugeInteger.suo
...........\...........\Debug
...........\debug
...........\HugeInteger
HugeInteger