Prime no checker

Here why divisors are taken in series 2 to n-1 and considered it as not prime

here we have not taken 1 in the range because every number can be divisible by 1 and and every number will be divisible by itself as well .
That’s why we have not included 1and n so that we can check whether the number is divisible by any other number in between the range .
if you have doubt you can ask here .
Happy Learning !!

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.