Unformatted text preview: //values of X and Y in every single trace if(X == 1) //if X=1, the value of Y is returned to be added in the return Y; //recursive call else if(X == Y) //if X=Y, the value of 1 is returned to be added in the return 1; //recursive call else return (Combinations(Y-1,X-1,level+1)+Combinations(Y-1,X,level+1)); //If neither of the above scenarios happen anymore, the program adds //everything that has been done in each recursive level until it //obtains a result, which would be the total number of combinations, //in this case 70. }...
View Full Document
- Winter '08
- The Return, Value added, int level, int Combinations, recursive level