abs (math function) in C.

 

01  #include <stdio.h>
02 #include <math.h>
03
04 int main()
05 {
06 int number = -1464;
07
08 printf("number: %d absolute value: %dn", number, abs(number));
09 return 0;
10 }
 
 OUTPUT :

number: -1464 absolute value: 1464

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *