answersLogoWhite

0

See whether the number is divisible by 2, and by all odd numbers up to the square root of the number. For numbers up to 100, it is enough to check the factors 2, 3, 5, and 7. For higher numbers you need to check more factors.

For very large numbers (for example, hundreds of digits), more efficient methods are known, but those methods are also more complicated.

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi

Add your answer:

Earn +20 pts
Q: To check whether given number is a prime number or not?
Write your answer...
Submit
Still have questions?
magnify glass
imp