文件名称:fraction
介绍说明--下载内容均来自于网络,请自行研究使用
/*
描述:
1.自定义分数类fraction,使用该类可以完成分数的输入、分数的加、减、乘、除二目运算和一目减运算、分数的约分操作、分数的倒数运算、对两个分数进行六种比较运算、以及对分数的输出等操作。
2.尽量用运算符重载函数。如,可重载+、-、*、/、>、>=、<、<=、==、!=,以实现分数的各种运算。并且实现分数与整数的混合运算。
3.尽可能考虑程序性能。-/* Descr iption: 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.
描述:
1.自定义分数类fraction,使用该类可以完成分数的输入、分数的加、减、乘、除二目运算和一目减运算、分数的约分操作、分数的倒数运算、对两个分数进行六种比较运算、以及对分数的输出等操作。
2.尽量用运算符重载函数。如,可重载+、-、*、/、>、>=、<、<=、==、!=,以实现分数的各种运算。并且实现分数与整数的混合运算。
3.尽可能考虑程序性能。-/* Descr iption: 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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
fraction\demo.cpp
........\Fraction.cpp
........\Fraction.h
fraction
........\Fraction.cpp
........\Fraction.h
fraction