Program to Find the absolute value of an integer taken as input.

  #include <stdio.h>

int main(void)
{
int num;

printf("\nEnter a number : ");
scanf("%d" ,&num);

if(num < 0)
{
printf("\nAbsolute value of %d is %d" ,num ,-num);
}
else
{
printf("\nAbsolute value of %d is %d" ,num ,num);
}


return 0;
}