RosettaCodeData/Task/Babbage-problem/Rust/babbage-problem-1.rust

11 lines
224 B
Plaintext

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
);
}