langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
14
Task/Least-common-multiple/Order/least-common-multiple.order
Normal file
14
Task/Least-common-multiple/Order/least-common-multiple.order
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include <order/interpreter.h>
|
||||
|
||||
#define ORDER_PP_DEF_8gcd ORDER_PP_FN( \
|
||||
8fn(8U, 8V, \
|
||||
8if(8isnt_0(8V), 8gcd(8V, 8remainder(8U, 8V)), 8U)))
|
||||
|
||||
#define ORDER_PP_DEF_8lcm ORDER_PP_FN( \
|
||||
8fn(8X, 8Y, \
|
||||
8if(8or(8is_0(8X), 8is_0(8Y)), \
|
||||
0, \
|
||||
8quotient(8times(8X, 8Y), 8gcd(8X, 8Y)))))
|
||||
// No support for negative numbers
|
||||
|
||||
ORDER_PP( 8to_lit(8lcm(12, 18)) ) // 36
|
||||
Loading…
Add table
Add a link
Reference in a new issue