Java Number Sum sum_quad(long max)

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

Description

Summe der Quadrate

License

Open Source License

Parameter

Parameter Description
max a parameter

Declaration

public static long sum_quad(long max) 

Method Source Code

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

public class Main {
    /**//  ww  w  .j  a v  a  2 s.c  o m
     * Summe der Quadrate
     * @param max
     * @return
     */
    public static long sum_quad(long max) {
        long result = 0;
        for (int i = 1; i <= max; ++i)
            result += i * i;
        return result;
    }
}

Related

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