trpl-zh-cn/listings/ch03-common-programming-concepts/listing-03-05/src/main.rs

8 lines
123 B
Rust

fn main() {
let a = [10, 20, 30, 40, 50];
for element in a {
println!("the value is: {element}");
}
}