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?
Asked
Active
Viewed 547 times
-5
-
31) Never post images of your code - see [this Meta post](http://meta.stackoverflow.com/a/285557/62576) for a list of the many reasons you should not do so. Copy and paste it as text. It is absolutely useless as an image. 2) Exit code 201 is a range check error, which means your code is exceeding the limits of one of the data types it's using. First turn on range checking in the compiler options, so you'll get an exception when it happens. Second, learn to use the debugger to step through your code so you can figure this sort of thing out yourself. – Ken White Dec 29 '16 at 13:48
1 Answers
1
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]

Marco van de Voort
- 25,628
- 5
- 56
- 89