Welcome to Westonci.ca, your go-to destination for finding answers to all your questions. Join our expert community today! Connect with a community of experts ready to provide precise solutions to your questions quickly and accurately. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

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.