I am trying to grab a term which is just smaller and larger than the assigned value using the below code. But there seems to be some problem. The value i assign is 25 so i would expect it to output a smaller value to be 20 instead of 10 and 20 and larger value to be 30 instead of 30 and 40. Can anybody help ?
Input:
10
20
30
40
Output:
My Value = 25
Smaller Value = 20
Bigger Value = 30