Assume that an array of integers named a has been declared and initialized.

LANGUAGE: Visual Basic

CHALLENGE:

Assume that an array of integers named a has been declared and initialized.  Write a single statement that assigns a new value to the first element of the array.  The new value should be equal to twice the value stored in the last element of the array.

SOLUTION:

a(0) = a(a.length - 1) * 2