C++ Exercises: Check three given integers and return true if the difference between small and medium and the difference between medium and large is same
Equal Differences for Three Integers
Write a C++ program to check three given integers (small, medium and large) and return true if the difference between small and medium and the difference between medium and large is same.
Sample Solution:
C++ Code :
Sample Output:
1 0 1
Visual Presentation:

Flowchart:

C++ Code Editor:
Contribute your code and comments through Disqus.
Previous: Write a C++ program to check two given integers and return the value whichever value is nearest to 13 without going over. Return 0 if both numbers go over.
Next: Write a C++ program to create a new string using two given strings s1, s2, the format of the new string will be s1s2s2s1.
What is the difficulty level of this exercise?
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics