Please help with this issue

ide of coding blocks is giving me the compilation error, whereas ideone mein compile ho ra hai code.
https://ide.codingblocks.com/s/304628..But still the answer is wrong, please have a look at my code

@aryan,
Make range 1e9.