[E-8]Write a function that, for each element a[j], adds |a[j]-j| to a sum. Use an array of integers. Typical output:
[E-8]
a[j]
|a[j]-j|
-3 -2 -1 0 1 2 3 4 5 6 sum = 30