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

PROGRAMMING:Output the sum of prime numbers

Luz5年前 (2021-05-10)题库374
Write the program to output the maximum 10 prime numbers within N and their sum; If the maximum prime number within n is less than 10, it will be output according to the actual number.
###Input format:
Enter the value of n.
###Output format:
Output the largest 10 prime numbers in the first line, with a space after each prime number. Output the sum of 10 primes in the second line.
###Input example:
```in
five hundred
```
###Output example:
```out
499 491 487 479 467 463 461 457 449 443
sum = 4696
```







answer:If there is no answer, please comment