Prime Generator : Code not working in codingblocks ide

My code is not working in coding blocks ide whereas it is working fine in pycharm.

##Code file:
https://drive.google.com/file/d/11ki2ioZpkYittZ5RiPRqEcINy0LgpQlG/view?usp=sharing

##Pycharm screenshot:

https://drive.google.com/file/d/1cebQpzUVGC7aCUKAaCVeCvj8LLhWQPGp/view?usp=sharing

Could you please review my code.

Hey @vi20083389, please give me access to view your drive files !

Thanks ! :slightly_smiling_face:

Hey @vi20083389, when I submitted your code , I got the following error.

Your program was too slow to compute the answer to one or more testcases. Think - is there a more efficient way to arrive at the solution than brute force?

So this means that the time taken to run your program is greater than the time which an optimized method would take. Try to think of another approach to solve the same problem. Your code is working fine but this is the brute force method. We need the most optimised version of code.

I hope this helps ! :+1:
Happy coding ! :slightly_smiling_face:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.