solutions: 5
This commit is contained in:
parent
cd8e40d2ca
commit
4b20b19146
15
smallest_multiple.rs
Normal file
15
smallest_multiple.rs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
fn main() {
|
||||||
|
let mut numerator: f64 = 1.;
|
||||||
|
|
||||||
|
'outer: loop {
|
||||||
|
for i in 1..=20 {
|
||||||
|
if numerator % (i as f64) != 0. {
|
||||||
|
numerator += 1.;
|
||||||
|
continue 'outer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
println!("{}", numerator);
|
||||||
|
}
|
Loading…
Reference in a new issue