Recursive function for finding sum of series calculated - number of terms till which sum of terms has been calculated current - number of terms for which sum has to be calculated N - Number of terms in the function to be calculated
static int seriesSum ( int calculated , int current , int N ) { int i , cur = 1 ;