mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-09 20:29:18 +00:00
16 lines
264 B
Rust
Executable File
16 lines
264 B
Rust
Executable File
// variables6.rs
|
|
//
|
|
// Execute `rustlings hint variables6` or use the `hint` watch subcommand for a
|
|
// hint.
|
|
|
|
|
|
|
|
const NUMBER: i32 = 4;
|
|
fn main() {
|
|
println!("Number {}", NUMBER);
|
|
println!("added {}",add(1,4));
|
|
}
|
|
|
|
fn add(x: i32, y: i32) -> i32 {
|
|
x + y
|
|
} |