-->
当前位置:首页 > 题库

PROGRAMMING:Using the list to realize the filtering method for prime number

Luz5年前 (2021-05-10)题库491
Write a program, input a natural number greater than 2, and then output a list of all prime numbers less than the number.
###Input format:
A natural number greater than 2.
###Output format:
A list of all primes less than that number.
###Input example:
Here is a set of inputs. For example:
```in
forty-seven
```
###Output example:
The corresponding output is given here. For example:
```out
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]
```







answer:If there is no answer, please comment