rust/src/test/run-pass/while.rs
2012-08-23 11:14:14 -07:00

13 lines
221 B
Rust

fn main() {
let mut x: int = 10;
let mut y: int = 0;
while y < x { log(debug, y); debug!("hello"); y = y + 1; }
while x > 0 {
debug!("goodbye");
x = x - 1;
log(debug, x);
}
}