Doubt in cumsum[i-1]

how can i start from 0 ?? it will take garbage value .

Hi @3lokesharora, pls save your code on ide.codingblocks.com and share the URL on this thread. Also for i=0 [i-1] will surely give an error. Hence it will either start from 1 atleast. Pls share your code here also so that we can rectify ur doubt precisely.