From 161f5d0f2a1f5b41899cf005b66892a6a2680891 Mon Sep 17 00:00:00 2001 From: voodev <196844799+voodev@users.noreply.github.com> Date: Sat, 1 Aug 2026 16:27:42 +0300 Subject: [PATCH] initial commit --- .gitignore | 1 + Cargo.lock | 7 +++++++ Cargo.toml | 6 ++++++ src/main.rs | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..1b27411 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "thebook" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..1cbed7b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "thebook" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..a24af8c --- /dev/null +++ b/src/main.rs @@ -0,0 +1,35 @@ +fn main() { + let x = 5; + let number = 8; + let mut y = 5; + println!("Hello, world!"); + println!("X: {}", x); + + println!("Y: {}", y); + + y = 12; + println!("Y has been set to: {}", y); + + if y < 11 { + println!("Y is less than 11: Y is {}", y); + } else { + println!("Y is more than 11: Y is {}", y); + } + + y = 6; + println!("Y has been set to: {}", y); + if y < 11 { + println!("Y is less than 11, Y is {}", y); + } + + if number % 4 == 0 { + println!("Y is divisible by 4"); + } else if number % 3 == 0 { + println!("Y is divisible by 3"); + } else if number % 2 == 0 { + println!("Y is divisible by 3"); + } + println!("Y has been changed to: {}", y); + + +}