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

please save ur code here -> https://ide.codingblocks.com/
and share the link with me.

your code is correct and working fine.
pls try to submit again.

image

yes its working thank you!