summaryrefslogtreecommitdiff
path: root/exercises/functions/functions5.rs
blob: c7841a6e1147eeeb71262186ed63c7d3015bd194 (plain)
1
2
3
4
5
6
7
8
9
10
11
// functions5.rs
// Make me compile! Execute `rustlings hint functions5` for hints :)

fn main() {
    let answer = square(3);
    println!("The answer is {}", answer);
}

fn square(num: i32) -> i32 {
    num * num;
}