blob: 5341cff6a047bded9c77aaaf80c24db959c6fcce [file] [log] [blame]
fn main() {
let mut count = 0u;
println!("Let's count until infinity!");
// Infinite loop
loop {
count += 1;
if count == 3 {
println!("three");
// Skip the rest of this iteration
continue;
}
println!("{}", count);
if count == 5 {
println!("OK, that's enough");
// Exit this loop
break;
}
}
}