You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
343 B
24 lines
343 B
1 year ago
|
fn main() {
|
||
|
let mut count = 0u32;
|
||
|
|
||
|
println!("Let's count until infinity!");
|
||
|
|
||
|
loop {
|
||
|
count += 1;
|
||
|
|
||
|
if count == 3 {
|
||
|
println!("three");
|
||
|
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
println!("{}", count);
|
||
|
|
||
|
if count == 5 {
|
||
|
println!("OK, that's enough");
|
||
|
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|