floatings

This commit is contained in:
Tyrel Souza 2023-02-25 00:56:17 -05:00
parent 9d23dc5e83
commit 04b6a18013
No known key found for this signature in database
GPG Key ID: F3614B02ACBE438E
3 changed files with 32 additions and 0 deletions

7
variables/Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "variables"
version = "0.1.0"

8
variables/Cargo.toml Normal file
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]

17
variables/src/main.rs Normal file
View File

@ -0,0 +1,17 @@
fn main() {
let x = 5;
let x = x + 1;
println!("X: {x}");
{
let x = x * 2;
println!("x: {x}");
}
println!("x: {x}");
let fx = 2.0;
let fy : f32 = 3.0;
println!("fx: {fx}");
println!("fy: {fy}");
}