Číslo a:
Absolutní hodnota je
 
 
if (a >= 0) {
  abs = a;
} else {
  abs = -1*a;
}