Free pascal exit code 201

586 Views Asked by At

my code

I'm trying to make a program to generate amicable numbers under 10000, but after i pressed ctrl+f9, it exited with exit code 201. How do i fix that?

1

There are 1 best solutions below

0
On

Probably in the expression a[a[i]], a[i] contains an invalid index, which leads to the range check error as Ken said.

For starters, you initialize cells with 0, but you don't initialize a[0]