
What should i write in if condition?
hello @devanshkapur
inside if u should write.
cnt- -; // because current element is not a part of series that we want
continue; // because we dont to execute next instrution of this loop.
im getting Arithmetic exception
but its working in other compilers
your code is correct and working fine.
pls try to submit again.

yes its working thank you!