How To Get Absolute Number In C

 

#include<stdio.h>
#include<conio.h>
void main ()
{
int num;
clrscr();
printf(“Enter A number to get it’s absolute Number”);
scanf(“%d”,&num);
if(num<0)
num=-num;
printf(“%d”,num);
getch();
}

After Running Program 🙂

Leave a Reply