COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
lcm.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int lcm (int a, int b)
 

Function Documentation

◆ lcm()

int lcm ( int a,
int b )

Definition at line 8 of file lcm.cpp.

8 {
9 return a / gcd(a, b) * b;
10}
int gcd(int a, int b)
Definition 1.cpp:157

References gcd().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function: