+ 6
Sieve Of Eratosthenes Algorithm
4 ответов
+ 4
Thanks @Ranjan 😃👏👏
+ 4
Thanks man👈👏👏
+ 3
Sieve of Eratosthenes
Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number.
For example, if n is 10, the output should be “2, 3, 5, 7”. If n is 20, the output should be “2, 3, 5, 7, 11, 13, 17, 19”.