Why run time error in the code'

@kailash_01 at line 23 of your code you should write a[ j ] you have written a[ i ].