3 like 0 dislike
63 views
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
[Normal] Coding (C) - asked in Introduction to Computer Programming I (C) by (20.9k points)
ID: 21860 - Available when: Unlimited - Due to: Unlimited
| 63 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.174.143
©2016-2024

Related questions

2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Jan 18, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21763 - Available when: Unlimited - Due to: Unlimited
| 120 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Jan 25, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21795 - Available when: Unlimited - Due to: Unlimited
| 99 views
12,783 questions
183,443 answers
172,219 comments
4,824 users