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

PROGRAMMING:Find the prime number within the specified range

Luz5年前 (2021-05-10)题库459
Prime number: also known as prime number, it refers to a positive integer (1 is not a prime number) with no other factors except 1 and itself.
Input two positive integers m and n (m ≤ n), output all prime numbers between M ~ n, and calculate the number.
Tip: define a function to judge prime number, calculate prime number through function call and count.
###Input format:
m n
M and N are the boundary of the range, and m ≤ n is required
###Output format:
All prime numbers between M and N are separated by spaces
Count = prime number
###Input example:
```in
10 20
```
###Output example:
```out
11 13 17 19
count = 4
```







answer:If there is no answer, please comment