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

PROGRAMMING:C programming experiment 4-6 prime search task 3

Luz5年前 (2021-05-10)题库453
Input a number n arbitrarily from the keyboard, program to calculate and output the sum of all prime numbers from 1 to n (including n).
###Input format:
The user enters any positive integer n.
###Output format:
The sum of all prime numbers from 1 to n.
###Input example:
Here is a set of inputs. For example:
```in
eight
```
###Output example:
The corresponding output is given here. For example:
```out
seventeen
```







answer:If there is no answer, please comment