资 源 简 介
/*
描述:
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.