giving a varaible a type

This commit is contained in:
Hariettemaina 2022-09-08 17:09:21 +03:00
parent dd23da3ff0
commit fe71a45ad2
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
// Make me compile! // Make me compile!
// Execute `rustlings hint variables1` or use the `hint` watch subcommand for a hint. // Execute `rustlings hint variables1` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
fn main() { fn main() {
let x = 5; let x = 5;

View File

@ -4,7 +4,7 @@
// I AM NOT DONE // I AM NOT DONE
fn main() { fn main() {
let x; let x: i32 = 10;
if x == 10 { if x == 10 {
println!("x is ten!"); println!("x is ten!");
} else { } else {