Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added cpp/liquid/liquid
Binary file not shown.
10 changes: 10 additions & 0 deletions cpp/liquid/src/ml_lcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
int ml_lcm(int n1, int n2)
// Compute the LCM(n1, n2)
{
int i,a;
if(n1>n2)
a=n1;
else
a=n2;
for(i=a;;i++)
{
if(a%n1==0 && a%n2==0)
return a;
}
return 0;
}

17 changes: 17 additions & 0 deletions cpp/liquid/src/ml_lcm.c~
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "math-lib.h"

int ml_lcm(int n1, int n2)
// Compute the LCM(n1, n2)
{
if(n1>n2)
a=n1;
else
a=n2;
for(i=a;;i++)
{
if(a%n1==0 && a%n2==0)
return a;
}

}