Initializing u and sum
float sum = y [ n - 1 ] [ 0 ] ; float u = ( value - x [ n - 1 ] ) / ( x [ 1 ] - x [ 0 ] ) ; for ( int i = 1 ; i < n ; i ++ ) { sum = sum + ( u_cal ( u , i ) * y [ n - 1 ] [ i ] ) / fact ( i ) ; } cout << " Value at " ▁ < < ▁ value ▁ < < ▁ " is " << sum << endl ; return 0 ; }