When i run program automatically terminates

https://www.codepile.net/pile/r4a0VVDG

Please be a little clear with your doubt. Are you getting wrong answer while submitting on hackerblocks or what?

when i execute in codeblocks software, it automatically terminates.

Is it running on any other online terminal?