idiombook
7/17/2017 - 8:20 AM

[language: Rust, syntax: while]

[language: Rust, syntax: while]

fn main() {
  let mut x = 5;
  let mut done = false;

  while !done {
    x += x - 3;
    println!("{}", x);
    if x % 5 == 0 {
        done = true;
    }
  }
}