diff --git a/smallest_multiple.rs b/smallest_multiple.rs new file mode 100644 index 0000000..50eebc7 --- /dev/null +++ b/smallest_multiple.rs @@ -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); +}