[email protected] wrote:
> #include <stdio.h>
> 
> int add (int x, int y) {
> int z; 
> z = x + y;
> return (z); 
> }
> main ()
> {
> int i, j, k;
> i = 10;
> j = 20;
> k = add(i, j); 
> printf ("The value of k is %d\n", k); 
> }
> how do you change the above code to the following 
> 
> + (2, 6)
> - ( 2, 6)
> 

I am not sure what you are looking for.  Maybe you do not understand that you 
do not have to use variables when calling your add function.  You can do the 
following:

k = add(2, 6);
k = add(2, -6);


Reply via email to