While with mut countdown

This commit is contained in:
Dan Buch 2017-12-22 10:28:49 -05:00
parent 03914257e0
commit 19b85a6a18
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7

View File

@ -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!!!");
}