Calculate sum (array question)

plzz help me understand the approach of this problem as i am not able to understand what is asked in the question

After each operation, every element of the cyclic array would be replaced by the sum of itself and the element lying X positions behind it in the cyclic array. All these replacements take place simultaneously.

could you share its code i am not able to do this

refer this https://ide.codingblocks.com/s/627388

i hope ur doubt is cleared now??

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

can you send a code without the use of vector …like na normal code

u can just write array where ever i have used vector

but i can’t understand what line 29 is doing what’s meant by auto keyword??

its just used for iterating. u can use formal for loop also for the same…