Implement the countdown using a Range
This commit is contained in:
parent
808b8f58b0
commit
852f5a9b76
1 changed files with 3 additions and 4 deletions
|
@ -1,7 +1,6 @@
|
|||
fn main() {
|
||||
let a = [10, 20, 30, 40, 50];
|
||||
|
||||
for element in a {
|
||||
println!("the value is: {element}");
|
||||
for number in (1..4).rev() {
|
||||
println!("{number}!");
|
||||
}
|
||||
println!("LIFTOFF!!!");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue