3 喜歡 0 不喜歡
93 瀏覽
Use the pointers p1, p2, and p3 and complete the following program to read two integers and display the sum of the integers between them. For example, if the user enters 6 and 10, the program should display 24 (7+8+9). The program should force the user to enter numbers less than 100 (<100) or greater than 0 (>0) and the first integer should be less than the second, else display "Invalid value".

Sample Input 1:

6 10

Sample Output 1:

24

Sample Input 2:

10 6

Sample Output 2:

Invalid value
 

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

相關問題

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