I am having the negative floating point number as:
a = -0.340515;
to convert this into positive number I used the abs() method as:
Use float fabsf (float n) for float values.
float fabsf (float n)
float
Use double fabs (double n) for double values.
double fabs (double n)
double
Use long double fabsl(long double) for long double values.
long double fabsl(long double)
long double
Use abs(int) for int values.
abs(int)
int