nombre y arreglos2

This commit is contained in:
2023-06-08 18:43:55 +02:00
parent 07d62f050e
commit 6e1cd4e0fc
6 changed files with 51 additions and 8 deletions

8
arreglos2/Cargo.toml Normal file
View File

@@ -0,0 +1,8 @@
[package]
name = "arreglos2"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

12
arreglos2/src/main.rs Normal file
View File

@@ -0,0 +1,12 @@
fn main() {
let mi_arreglo = ["Lovecraft", "Poe", "Barker", "King"];
let mut i = 0;
loop {
if i >= mi_arreglo.len() {
break;
}
println!("{}", mi_arreglo[i]);
i = i + 1;
}
}