Skip to content

Commit

Permalink
trying mutable variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphonseMehounme committed Nov 19, 2024
1 parent ef30560 commit ec87716
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Rust/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ fn main() {
let width = message.chars().count();
let mut writer = BufWriter::new(stdout.lock());
say(&message, width, &mut writer).unwrap();
let mut my_name = "Alphonse";
let my_age: i32 = 26;
println!("My name is {my_name} \
and I am {my_age}!"
);
my_name = "Ferris";
println!("My name is {my_name} and I \
am {my_age}!"
);
}

0 comments on commit ec87716

Please sign in to comment.