while
Loops while a condition is true.
fn main() { let mut count:i32 = 1; while count < 5 { println!("Iteration: {}", count); count += 1; } }
Learn more: https://doc.rust-lang.org/stable/rust-by-example/flow_control/while.html
Loops while a condition is true.
fn main() { let mut count:i32 = 1; while count < 5 { println!("Iteration: {}", count); count += 1; } }
Learn more: https://doc.rust-lang.org/stable/rust-by-example/flow_control/while.html