Rust syntax: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 638:
 
fn main() {
let result1: i32 = sum(10, 20);
println!("Sum is: {}", result1); // Sum is: 30
 
let result2: f32 = sum(10.23, 20.45);
println!("Sum is: {}", result2); // Sum is: 30.68
}