RosettaCodeData/Task/Babbage-problem/Rust/babbage-problem-1.rust
2023-07-01 13:44:08 -04:00

10 lines
224 B
Text

fn main() {
let mut current = 0;
while (current * current) % 1_000_000 != 269_696 {
current += 1;
}
println!(
"The smallest number whose square ends in 269696 is {}",
current
);
}