Variable count increment

when 8 first occured in the array the count variable should have been incremented to 1.
why it is still 0 at si=1

Hey @Par1hsharma
In this question, aim is to find all the indices at which a particular element M is found in the array of size n.
for example
5
3 2 1 2 3
2
2 present At index 1
2 present At index 3
output
1 3