#include<stdio.h>
#include<conio.h>
int main()
{
int a;
printf("Enter any number : ");
scanf("%d", &a);
if(a>0)
printf("\n\n%d is it's absolute value.", a);
else
printf("\n\n%d is it's absolute number.", -1*a);
getch();
return 0;
}
Ad
Chapter - 3: The Decision Control
Find the absolute value of a number entered through the keyboard.
Ad
Ad