Thursday, June 5, 2008

Intro to fn abs ( )

/*Introduction to function abs -absolute value */

# include<>
#include<>

int main(void)


{
int a,b;
printf("Enter a positive & Negative integer :");
scanf("%d %d",&a,&b);

printf("The value of a /b is %d \n ", (abs (a) / abs (b)));

printf("The value of a %% b is %d \n", (abs (a) % abs (b)));
return 0;

}

No comments: