fn sum_squares(n: u32) -> u32 {
    if n == 0 {
        0
    } else {
        n * n + sum_squares(n - 1)
    }
}
/// finds the sum of the squares of the numbers from 1 to n
/// 
/// this function is implemented using recursion
/// 
/// # Arguments
/// * `n` - a positive integer
/// # Returns
/// 1 + 4 + 9 + 16 + ... + n<sup>2</sup>
finds the sum of the squares of the numbers from 1 to n
this function is implemented using recursion
finds the sum of the squares of the numbers from 1 to n this function is implemented using recursion
fn sum_squares(n: u32) -> u32 {
    if n == 0 {
        0
    } else {
        n * n + sum_squares(n - 1)
    }
}
fn sum_squares ( n : u32 ) -> u32 { if n == 0 { 0 } else { n * n + sum_squares ( n - 1 ) } }
finds the sum of the squares of the numbers from 1 to n
this function is implemented using recursion
finds the sum of the squares of the numbers from 1 to n this function is implemented using recursion
n
u32
None
n
u32