Search code examples
arraysindexingtheory

adding the middle 20 values of array 0-99


This may seem quiete easy to everyone else but I am struggling to comprehend it. I have to add up the numbers held in the middle 20 indexes of an array 0-99 but I cant work out from what index to what index I should add. Is it from 40-60? or is that 22 values?


Solution

  • index 40 - index 59 is your middle-range ;)