Java Number Sum sum_quad_endrec(long max)

Here you can find the source of sum_quad_endrec(long max)

Description

Summe der Quadrate endrekursiv

License

Open Source License

Parameter

Parameter Description
max a parameter

Declaration

public static long sum_quad_endrec(long max) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//w w w .  j a  v a 2s. c om
     * Summe der Quadrate endrekursiv
     * @param max
     * @return
     */
    public static long sum_quad_endrec(long max) {
        return quad_endrec(0, max);
    }

    private static long quad_endrec(long i, long max) {
        if (max < 1)
            return i;
        return quad_endrec(i + max * max, max - 1);
    }
}

Related

  1. Sum(Object in, int min, int max)
  2. sum(String fieldName)
  3. sum(String str11, String str22)
  4. sum0ToN(int n)
  5. sum_quad(long max)
  6. sumaMesFull(String sF, int n)
  7. sumAsDouble(Iterable values)
  8. SumDiffErr(float Term1Err, float Term2Err)
  9. sumDigits(String number)