Please check my code. it is giving right output but it is also printing an unwanted thing

here is my code

this should be j>=0

also in main while printing the array
i should go till n-1

Modified Code

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning: