rustup doc Learned about the simple command to read the offline documentation.cargo doc --open Learned about the simple command to read the offline documentation of cargo and the various crates.
example code ` fn main(){ let a = 5; print!(“a variable assignment value : {a}\n”); // Trying to change the value of x a = 10; print!(“a variable value after change : {a}\n”); } `
The output at our real program.

After applying the mut keyword. Let’s see the magic let mut a = 5 perfectly works here.


integers, floating point numbers, boolean, character
i32, u32, f64, bool, char,etc.
Arrays (immutable)
Tuples (immutable)
Vector (Mutable)
` I Just build a random ip address generator using the mutable vectors, with the help of std::io, rand::Rng, std::{threads, time::Duration} crates from the rust standard library.
usage: std::io
io::stdin.read_lines(&address of the declared variable).except(“Reason”);
rand::Rng.random_choice(1..=100); //generates the random number
thread::sleep(Duration::from_secs(3)) // takes the program to new height by adding the 3 seconds pause while generating the random ip_addresses.
Note: New way to print the output with the having the multiple placeholders as: # Example: println!(“==== Assigning the ip addresse to Block{}{}”, _host.to_string() + “ to device”, _subnet.to_string() + “ ====”); `

base_amount = $ 160
increment_amount = $1
weeks = 10-weeks
salary-distributed only on the 2-weeks
1st-week salary = $160
2nd-week salary = $160 + $160 + $1
3rd-week salary = 2nd-week-salary + 2nd-week-salary + increment_amount
4th-week salary = 3rd-week-salary + 3rd-week-salary + increment_amount
5th-week salary = 4th-week-salary + 4th-week-salary + increment_amount
