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

PROGRAMMING:4.2 - calculate the sum of all integers between two numbers

Luz5年前 (2021-05-10)题库429
Write a program to read the value of two integers as follows, and then calculate the sum of all integers between them.
```
Please enter two integers.
Integer a: 37
Integer B: 28
The sum of all integers greater than or equal to 28 and less than or equal to 37 is 325.
```
-----From exercise 4-2
###Input example:
```in
twenty-eight
thirty-seven
```
###Output example:
```out
Please enter two integers.
Integer a: integer B: the sum of all integers greater than or equal to 28 and less than or equal to 37 is 325.
```







answer:If there is no answer, please comment