Fast Enterprises interview question

Write an algorithm which will display prime numbers from 1 to n

Interview Answer

Anonymous

23 Mar 2019

If number is not divisible by any number from 2 to sqrt(n), then it is a prime number