Doubt in the code

run time error is coming not able to figure this out ,please comment the error https://ide.codingblocks.com/s/326883

@Adhyayan.
First calculate prime numbers till 1000001 using sieve and then just traverse between a and b.

Also, your code will give error if a=0.