+ 1

My code is not working perfectly please help me

https://code.sololearn.com/c8Bj9yAhBTLP/?ref=app

8th Aug 2020, 5:43 PM
Tina_Agrawal
Tina_Agrawal - avatar
5 ответов
+ 2
you are welcome!
9th Aug 2020, 4:35 PM
Alexander Thiem
Alexander Thiem - avatar
+ 1
In line 11 better make for(int i=n-1; i>=0; i--){ instead of for(int i=n-1; i>=n; i--){ Then it works perfectly!
8th Aug 2020, 6:02 PM
Alexander Thiem
Alexander Thiem - avatar
+ 1
Of course! Input: 3 3 8 7! What does not work like you want it?
9th Aug 2020, 3:56 PM
Alexander Thiem
Alexander Thiem - avatar
0
Nothing happened after change
9th Aug 2020, 3:28 AM
Tina_Agrawal
Tina_Agrawal - avatar
0
Actually I was giving input without space now my code is working perfectly thank you so much
9th Aug 2020, 4:03 PM
Tina_Agrawal
Tina_Agrawal - avatar