
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - abs
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
abs
Usage
#include <stdlib.h>
int abs(int i);
Description
abs produces the absolute value of its integer argument.
Example
#include <stdlib.h>
#include <stdio.h>
main()
{
int numbr, absval;
numbr = -3;
absval = abs(numbr);
printf("The abs of (%d) is %d\n",numbr,absval);
}
Return Value
abs returns the absolute value of its integer argument.
See Also: labs
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson