2024-10-16 15:15:51 +00:00
|
|
|
fn main() {
|
2024-10-16 15:27:33 +00:00
|
|
|
let a = [10, 20, 30, 40, 50];
|
|
|
|
let mut index = 0;
|
2024-10-16 15:16:14 +00:00
|
|
|
|
2024-10-16 15:27:33 +00:00
|
|
|
while index < 5 {
|
|
|
|
println!("the value is: {}", a[index]);
|
2024-10-16 15:16:14 +00:00
|
|
|
|
2024-10-16 15:27:33 +00:00
|
|
|
index += 1;
|
2024-10-16 15:18:24 +00:00
|
|
|
}
|
|
|
|
}
|