Implement the countdown using a Range

This commit is contained in:
Manuel Thalmann 2024-10-16 17:46:40 +02:00
parent 808b8f58b0
commit 852f5a9b76

View file

@ -1,7 +1,6 @@
fn main() { fn main() {
let a = [10, 20, 30, 40, 50]; for number in (1..4).rev() {
println!("{number}!");
for element in a {
println!("the value is: {element}");
} }
println!("LIFTOFF!!!");
} }