3 喜歡 0 不喜歡
63 瀏覽
Write a program that reads two integers and displays the sum of the integers between them. For example, if the user enters 3 and 8, the program should display 22 because 4+5+6+7 = 22. The program should check which one of the two input numbers is the greater and act accordingly.

Sample Input:

3 8

Sample Output:

22

 

References: C From Theory
[正常] Coding (C) - 最新提問 分類:Introduction to Computer Programming I (C) | 用戶: (20.9k 分)
ID: 21860 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 63 瀏覽
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.71.222.250
©2016-2024

相關問題

2 喜歡 0 不喜歡
0 回答
[正常] 開放式問答 - 最新提問 1月 18, 2017 分類:Introduction to Computer Programming I (C) | 用戶: The Contributor (20.9k 分)
ID: 21763 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 120 瀏覽
3 喜歡 0 不喜歡
0 回答
[正常] Coding (C) - 最新提問 1月 25, 2017 分類:Introduction to Computer Programming I (C) | 用戶: The Contributor (20.9k 分)
ID: 21795 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 99 瀏覽
12,783 問題
183,443 回答
172,219 留言
4,824 用戶