#![allow(non_snake_case)]
#![allow(while_true)]
fn getLMC(a : i32, b : i32) -> i32 {
let mut lmc = if a > b {a} else {b};
while true {
if lmc % a == 0 && lmc % b == 0 {
return lmc;
}
lmc += 1;
}
return 0;
}
fn main() {
let a = 12;
let b = 20;
println!("The LCM (Least Common Multiple) of {} and {} is: {}", a, b, getLMC(a, b));
}
/*
run:
The LCM (Least Common Multiple) of 12 and 20 is: 60
*/