pccoeacm / all-calc

A calculator to calculate anything you can think of!
MIT License
1 stars 38 forks source link

Primality Test using Trial division Function #22

Open MEHUL25 opened 4 years ago

MEHUL25 commented 4 years ago

Todo

We try to find a non-trivial divisor, by checking if any of the numbers between 2 and n−−√ is a divisor of n. If it is a divisor, than n is definitely not prime, otherwise it is.

Example

Input : 11 Output : true

Important

MEHUL25 commented 4 years ago

I will do it.

tejasmorkar commented 4 years ago

You can start working on it!