Loop to print the N terms of the series and find their sum
for ( i = 1 ; i < n ; i ++ ) { total = total + multi ; document . write ( multi + " " ) ; multi = multi * x ; } document . write ( " " ) ; return total ; }