organizado en carpetas
This commit is contained in:
8
curso_tinchicusls/porvalor/Cargo.toml
Normal file
8
curso_tinchicusls/porvalor/Cargo.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "porvalor"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
9
curso_tinchicusls/porvalor/src/main.rs
Normal file
9
curso_tinchicusls/porvalor/src/main.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
fn agregar(a: i32, b: i32) -> i32 {
|
||||
// como no tiene punto y coma este dato es retornado
|
||||
a + b
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let valor = agregar(3, 5);
|
||||
println!("{}", valor)
|
||||
}
|
||||
Reference in New Issue
Block a user