#include<stdio.h>
main()
{
int a,abs;
printf("\nEnter a number=");
scanf("%d",&a);
if(a<0)
abs=a*(-1);
else
abs=a;
printf("\nThe absolute value of %d is %d",a,abs);
}
main()
{
int a,abs;
printf("\nEnter a number=");
scanf("%d",&a);
if(a<0)
abs=a*(-1);
else
abs=a;
printf("\nThe absolute value of %d is %d",a,abs);
}
No comments:
Post a Comment