While with mut countdown
This commit is contained in:
parent
03914257e0
commit
19b85a6a18
@ -1,10 +1,11 @@
|
||||
fn main() {
|
||||
let condition = true;
|
||||
let number = if condition {
|
||||
5
|
||||
} else {
|
||||
6
|
||||
};
|
||||
let mut number = 3;
|
||||
|
||||
println!("The value of number is: {}", number);
|
||||
while number != 0 {
|
||||
println!("{}!", number);
|
||||
|
||||
number = number - 1;
|
||||
}
|
||||
|
||||
println!("LIFTOFF!!!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user