x
can be transformed into a parameterint abs(int x) {
if (x<0) { x=-x; } else {}
return x;
}
int main() {
printf("%i", abs(-12) );
printf("%i", abs( 24) );
}
Comments:
a. The parameters and returned value have a specific representation.
b. The printf
is a sub-program having two parameter with a format, eg. "%i" for an integer, and a value.