The MathUtils program is a math function packaging tool class for Java programs. This experiment is mainly aimed at testing the gcd(int,int) method in the MathUtils program. The main function of the gcd(int,int) method is to calculate the greatest common divisor of two integers.
- Input specifications
Inputs | Types | Limits | Description |
---|---|---|---|
p | int | Integer | |
q | int | Integer |
-
Output specifications
The output parameter is the greatest common divisor m of p and q, and the type is int.
-
Description of MRs