文件名称:lab2
介绍说明--下载内容均来自于网络,请自行研究使用
定义一个分数类,用两个整数数据成员表示分数的分子和分母,成员函数包括求两个整数的最大公约数gcd()和最小公倍数lcm()的函数,再定义构造函数、获取分数、打印分数、实现分数四则运算的成员函数。 计算结果仍用分数表示并调用gcd(),lcm()成员函数化简-Define a fraction of class, with two integer data members of the numerator and denominator of the fraction, member functions, including seeking the greatest common divisor of two integers gcd () and least common multiple lcm () function, and then define a constructor, access points, Printing scores, fractional arithmetic member functions. The results are still using fractions and call gcd (), lcm () member function simplification
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lab2\lab2_1.cpp
....\lab2_2.cpp
....\lab2_3.cpp
....\lab2_4.cpp
lab2
....\lab2_2.cpp
....\lab2_3.cpp
....\lab2_4.cpp
lab2