Code:
int a;

if (a < 0)
  a = a*(-1)
oder du benutzt die Bibiliotheksfunktionen dafür ...

MfG Kjion