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