Posted by **Dave** on Thursday, August 27, 2009 at 9:10am.

Show what the final output of this function will be. The answer will be in the form x * Z - y

Private Function F(x as Int, y As Int, z as Int)

If (y = 1) then

Return 2

Else

Return x * Z - y + F(x-1,y-1, z)

End If

End Function

- Computers -
**Jordan**, Thursday, August 27, 2009 at 9:36am
if this is your code

Private Function F(x as Int, y As Int, z as Int)

If (y = 1) then

Return 2

Else

Return x * Z - y + F(x-1,y-1, z)

End If

End Function

what is your test data. if you test this code with y=1 then you will get an answer of 2, else Return x * Z - y + F(x-1,y-1, z)

- Computers -
**Dave**, Thursday, August 27, 2009 at 9:50am
The test data I'm using is y = 3. I tried using a trace table, but I get back to 2. Not sure how to get an answer in the form x * Z - y. Any help will be much appreciated.

Thanks

## Answer this Question

## Related Questions

- discrete math - 1. let A and B be sets. Show that A U (B - A)=A U B 2. determine...
- Computers - //program that puts two lists in order in one single list with all ...
- computer science - IHow do you refractor this: public class Employee { private ...
- computer science - 9.10: Reverse Array Write a function that accepts an int ...
- computer science - int *reverse(const int *, int); int *temp; temp = reverse(...
- Calculus - Integrate x dx/(1-x). I have proceeded thus- Int xdx/(1-x)=int -(x-1+...
- programming - I really need help in this it makes me confuse.I should make a ...
- computer science - Im trying to create an arraylist that's sorted but I have no ...
- programming - m trying to create an arraylist that's sorted but I have no idea ...
- Java programming - can anybody help me.. Multidimensional Array Use a two-...

More Related Questions