Answers for "abs function in c language"

0

abs function in c language

//abs is function which returns absolute value of a integer 
#include <stdio.h>
#include <stdlib.h>
int main()
{
   int m = abs(34);     // m is assigned to 200
   int n = abs(-40);    // n is assigned to -400
 
   printf("Absolute value of m = %d\n", m);
   printf("Absolute value of n = %d \n",n);
   return 0;
}
Posted by: Guest on June-19-2021

Browse Popular Code Answers by Language