Finding primes in inclusive range

Can I know the problem with this code?

Hey Aditya, can you please share your code so that we can help you in debugging the code. Copy your code on ide , save it and share that link here.

Hey, if you don’t have any further doubt on this problem then please do mark this doubt as resolved.