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

PROGRAMMING:Sum a Sequence of Integers

Luz5年前 (2021-05-10)题库574
Write a program that sums a sequence of integers. Assume that
the first integer read with scanf specifies the number of values remaining to be entered. Your program
should read only one value each time scanf is executed. A typical input sequence might be
5 100 200 300 400 500
where the 5 indicates that the subsequent five values are to be summed.
### Input Specification:
Each input file contains one test case, which gives N and N numbers in a line. Separating each number with a space.
### Output Specification:
For each test case, print in a line the value of sum. No space before or behind it.
### Sample Input:
```in
5 100 200 300 400 500
```
### Sample Output:
```out
one thousand and five hundred
```







answer:If there is no answer, please comment