Join the IDNLearn.com community and start getting the answers you need today. Find in-depth and trustworthy answers to all your questions from our experienced community members.

Write a for loop that sets each array element in bonusscores to the sum of itself and the next element, except for the last element which stays the same. Be careful not to index beyond the last element.