CJCoding With Joseph

Sum of Elements at Odd Indices

Given the array {10, 20, 30, 40, 50, 60}, add up the elements at the odd indices 1, 3, 5, ... and print the total:

120

Expected Output:

120
Topics:
Arrays
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.