Here is the sample of my calculation.
m_fnumber1 - m_fnumber2 = m_fresults;
The situation is like this.
i want the value of the calculation is in positive value. That mean the "m_fnumber1 > mf_number2"
The question is how i want to get the positive value if "m_fnumber2 > m_fnumber1".
Is it in c++, i can use any simple function to make it work as i request?
It means that you need absolute value of the result which can be obtained using abs() function in C/C++.
Please see the following code:
# include <stdio.h>
# include <stdlib.h>
int main ()
int y, result;
result = abs (x-y);
printf ("%d\n", result);