Skip to main content
1-Visitor
December 16, 2014
Solved

I keep getting the error: This array index is invalid for this array

  • December 16, 2014
  • 2 replies
  • 2552 views

I tried to write a program using the attached algorithm. However I keep getting "This array index is invalid for this array" error. It occurs in various places when I try to fix it.

Best answer by RichardJ

You have not assigned a value to z[n, only to z[n-1.

2 replies

RichardJ19-TanzaniteAnswer
19-Tanzanite
December 16, 2014

You have not assigned a value to z[n, only to z[n-1.

1-Visitor
December 16, 2014

Yeah I just figured this out few minutes ago. And the 'N=1000' value was unreasonable as well.