----- FUNCTIONS ----- You can define functions before or after main
()
| 96 | // ----- FUNCTIONS ----- |
| 97 | // You can define functions before or after main |
| 98 | fn say_hello(){ |
| 99 | println!("Hello"); |
| 100 | } |
| 101 | |
| 102 | // You can pass arguments to functions |
| 103 | fn get_sum(x: i32, y: i32){ |