mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-12 05:39:19 +00:00
19 lines
325 B
Rust
19 lines
325 B
Rust
// variables2.rs
|
|
// Execute `rustlings hint variables2` or use the `hint` watch subcommand for a hint.
|
|
|
|
|
|
fn main() {
|
|
// const x:i32 = 50;
|
|
// let x =10;
|
|
let x;
|
|
|
|
let mewo = 5;
|
|
x = 2 * mewo;
|
|
if x == 10 {
|
|
println!("x is ten!");
|
|
} else {
|
|
println!("x is not ten!");
|
|
|
|
}
|
|
}
|