write javascript code to input any two numbers by the user
and display the LCM of two numbers
Answers
Answered by
0
Answer:
merry Christmas
Answered by
0
Answer:
Implementation
let lcm = (n1, n2) => { //Find the gcd first let gcd = gcd(n1, n2); //then calculate the lcm return (n1 * n2) / gcd; } Copy.
log(lcm(15, 20)); console. ...
let lcm = (n1, n2) => { //Find the smallest and biggest number from both the numbers let lar = Math. ...
log(lcm(20, 15)); console.
Explanation:
hope it helps tq
Similar questions