2017-12-22 15:26:26 +00:00
|
|
|
fn main() {
|
2017-12-22 15:29:59 +00:00
|
|
|
let a = [10, 20, 30, 40, 50];
|
|
|
|
let mut index = 0;
|
2017-12-22 15:27:43 +00:00
|
|
|
|
2017-12-22 15:29:59 +00:00
|
|
|
while index < 5 {
|
|
|
|
println!("the value is: {}", a[index]);
|
|
|
|
|
|
|
|
index = index + 1;
|
2017-12-22 15:28:49 +00:00
|
|
|
}
|
2017-12-22 15:26:26 +00:00
|
|
|
}
|