Skip to content

Commit

Permalink
Write a function-like macro ABS(x) that computes the absolute value o…
Browse files Browse the repository at this point in the history
…f a number x
  • Loading branch information
JayMburu committed Apr 12, 2022
1 parent 859431c commit 8f9d897
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 0x0D-preprocessor/3-function_like_macro.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef FUNCITION_LIKE_MACRO_H
#define FUNCITION_LIKE_MACRO_H
#define ABS(x) ((x < 0) ? (x) * (-1) : (x))
#endif

0 comments on commit 8f9d897

Please sign in to comment.