added function and variable lessons.

This commit is contained in:
gabe 2022-06-20 15:44:29 -05:00
parent 4106843d70
commit 405437686a
6 changed files with 118 additions and 0 deletions

View file

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

View file

@ -0,0 +1,12 @@
fn main() {
let x = 5;
let x = x + 1;
{
let x = x * 2;
println!("The value of x in the inner scope is: {}", x);
}
println!("The value of x is: {}", x);
}