rust/src/test/run-pass/while-and-do-while.rs

8 lines
166 B
Rust

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