entrada, argumento, bucles y condición

This commit is contained in:
2023-06-02 18:44:19 +02:00
parent c945ae68ec
commit bf9b2271d0
9 changed files with 105 additions and 1 deletions

8
argumento/Cargo.toml Normal file
View File

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

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

@@ -0,0 +1,12 @@
use std::env;
// cargo run Huevos Pelotas Narices
fn main() {
let args: Vec<String> = env::args().collect();
println!(
"Pasaste {:?} argumentos, ellos fueron {:?}",
args.len() - 1,
&args[1..]
);
}