mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 21:29:18 +00:00
giving a type to a variable
This commit is contained in:
parent
b7bcbed9fa
commit
4723312a49
@ -1,7 +1,7 @@
|
|||||||
// variables5.rs
|
// variables5.rs
|
||||||
// Execute `rustlings hint variables5` or use the `hint` watch subcommand for a hint.
|
// Execute `rustlings hint variables5` or use the `hint` watch subcommand for a hint.
|
||||||
|
|
||||||
// I AM NOT DONE
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let number = "T-H-R-E-E"; // don't change this line
|
let number = "T-H-R-E-E"; // don't change this line
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
||||||
const NUMBER = 3;
|
const NUMBER: i32 = 3;
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Number {}", NUMBER);
|
println!("Number {}", NUMBER);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user