Define parameters instead of variables. `f(x){int y=x+1;...}` `f(x,y){y=x+1;...}` You don't need to actually pass the second parameter.