Finding mid-point | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Finding mid-point

Hello, The basic formula to find the mid-point is (x+y)/2 right? This does not fit well while we find the mid-point between 1 and 100. I know it should be 50 but when I plug in the values I get 50.5 This might be the time I really need to recall my high school stuff. Hint or answer is appreciated. Thanks.

18th Feb 2017, 8:50 PM
Safal Basnet
Safal Basnet - avatar
3 Answers
+ 3
It gets 50.5 because this really is the mid-point between 1 and 100. x - 1 = 100 - x ==> x = (100+1)/2 ==> x = 50.5 50 is a mid-point or the average of 0 and 100. x - 0 = 100 - x ==> x = 100/2 ==> x = 50
18th Feb 2017, 9:07 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
Yep, thanks for spotting the obvious mistake, already corrected.
19th Feb 2017, 7:44 AM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
0
I just read this and said to myself "i should know this". thank you two :) just one question to Kuba - I think I didn't underatand the equation. isn't 1+x = 100 - x ==> x=99/2?
18th Feb 2017, 11:09 PM
Moshe