diff options
Diffstat (limited to 'rushs/tinyprintf/my_abs')
| -rw-r--r-- | rushs/tinyprintf/my_abs/my_abs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rushs/tinyprintf/my_abs/my_abs.c b/rushs/tinyprintf/my_abs/my_abs.c new file mode 100644 index 0000000..fc89d2f --- /dev/null +++ b/rushs/tinyprintf/my_abs/my_abs.c @@ -0,0 +1,11 @@ +int my_abs(int n) +{ + if (n < 0) + { + return -n; + } + else + { + return n; + } +} |
