FENIX_libc/stdlib/abs.c

7 lines
78 B
C
Raw Normal View History

2020-12-01 23:40:03 +00:00
#include <stdlib.h>
int abs(int x) {
int y = x < 0 ? -x : x;
return y;
}