Here you can find the source of sum_quad(long max)
Parameter | Description |
---|---|
max | a parameter |
public static long sum_quad(long max)
//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; } }