rustlings/exercises/variables/variables6.rs
2023-06-21 12:23:47 +09:30

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
}