0

Please found error in my program

And tell me after found error https://code.sololearn.com/cfEEn3ZSh6Kv/?ref=app

28th Oct 2022, 3:21 PM
Ranjna Gupta
4 Respostas
+ 1
What is trouble ypu are facing with this code? Mention it clearly.. You have logic error that using pos = n[i] + 1 lead wrong output. Use pos = i+1 instead.
28th Oct 2022, 3:33 PM
Jayakrishna 🇮🇳
+ 1
I am try not come
28th Oct 2022, 3:33 PM
Ranjna Gupta
+ 1
Ranjna Gupta Not able to understand...! You can Write in your native language..!!!!
28th Oct 2022, 3:37 PM
Jayakrishna 🇮🇳
0
Ranjna Gupta line 16 should maybe be n[ j ] not n[ m ]. n[ m ] is causing and index out of bounds exception because the array is 9 elements long. This means that the indexes are 0-8. In line 16 you are directly trying to access a memory location outside of your array.
29th Oct 2022, 2:37 AM
The Darkness
The Darkness - avatar