Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 424 Bytes

README.md

File metadata and controls

29 lines (23 loc) · 424 Bytes

Variables:

  • main.rs:

  • basic

fn main() {
    let year:i32 = 2021;

    println!("This year is: {} ", year)
}
  • storing
fn main() {
    /* storing a variable and printing it out */
    let year:i32 = 2021;
    println!("This year is: {}", year)

    /* again storing another variable inside the defined variable */
    year = 2021;
    println!("Next year is: {}", year)
}
$ cargo run