fn add(a: i32, b: i32) -> i32 { a + b } fn main() { let result = add(2, 3); println!("{}", if result == 5 { "pass" } else { "fail" }); }
Output
Click Run to execute, or Check to validate.
Ask questions or share tips about this tutorial
Sign in to join the discussion