(JAVA )Write a declaration that populates an array with thefollowing numbers
21, 43, 10
then prints them out in the following format:
[a0, a1, a2, …,an]
and finally prints the alternating sum on a new line –
that is, if the array index is even add the value to thetotal,
or if the array index is odd subtract the value from the total
For example:
Result[21, 43, 10]-12
the output should completely same with the Result
Expert Answer
An answer will be send to you shortly. . . . .