Sums


Premium Content - Free Preview

You're writing a program to to analyze test grades, and would like to know the sum of 3 "representative" grades that are stored in an array.

Challenge

You will be given an array with an odd number of elements. Print the sum of the first, middle and last element in the array. For example, when given {1,2,3,4,5}, print 9 (1+3+5). Each sum should be printed on its own line.


End of Free Content Preview. Please Sign in or Sign up to buy premium content.

Comments

Contact Us
Sign in or email us at [email protected]