首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > / *说明:1。自定义分数的类分数,使用这样的分数可以C。

/ *说明:1。自定义分数的类分数,使用这样的分数可以C。

资 源 简 介

/* 描述: 1.自定义分数类fraction,使用该类可以完成分数的输入、分数的加、减、乘、除二目运算和一目减运算、分数的约分操作、分数的倒数运算、对两个分数进行六种比较运算、以及对分数的输出等操作。 2.尽量用运算符重载函数。如,可重载+、-、*、/、>、>=、<、<=、==、!=,以实现分数的各种运算。并且实现分数与整数的混合运算。 3.尽可能考虑程序性能。-/* Description: 1. Custom scores of class fraction, the use of such scores can complete the input of scores add, subtract, multiply, in addition to two operations and a head and cut operation, scores of about sub-operation, scores of the reciprocal operation, pairs of two scores in the six comparison operators, as well as scores of output and other operations. 2. The best use of operator overloading function. For example, can be overloaded+,-,*,/,> ,> =,< ,< =,==,!=, in order to achieve a variety of computing scores. And achieve scores and mixed integer operations. 3. As far as possible to consider application performance.

文 件 列 表

fraction
demo.cpp
Fraction.cpp
Fraction.h

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP