helos1/libc/abs.c
2021-10-10 14:39:17 +08:00

10 lines
92 B
C

#include <stdint.h>
int abs(int val) {
if (val < 0)
return -val;
else
return val;
}