0_0_36507580_20537.cpp: In function 'int work()': 0_0_36507580_20537.cpp:24:47: error: invalid types 'double[int]' for array subscript double ans = 0.5 * a * h + 0.5 * a * h * ans[n]; ^