Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int f(int* pnBuffer, int nSize, int nIndex)
- {
- int nSum = 0;
- for(int i = 0; i < nSize; i++)
- {
- if(i == nIndex)
- {
- nSum += pnBuffer[i];
- nSum += pnBuffer[nSize - i - 1];
- nIndex *= nIndex;
- }
- }
- return nSum;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement