Computers
posted by Dave .
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(x1,y1, z)
End If
End Function

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(x1,y1, 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(x1,y1, z) 
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
Respond to this Question
Similar Questions

discrete math
1. let A and B be sets. Show that A U (B  A)=A U B 2. determine whether f is a function from Z to R if a) f(n)= +n b) 1/(n square 4) For 1. BA is the same as B intersect ~A (That's the complement of A) So A U B = A U (B int ~A) … 
Computers
//program that puts two lists in order in one single list with all the numbers in order import java.util.Scanner; public class listOrder { public static void main (String [] args){ int [] list1; int [] list2; int [] list3; int temp; … 
programming
I really need help in this it makes me confuse.I should make a program to find a pattern...so can somebody help me... Write a function to recognize an pattern within another array. Your function should have the following prototype. … 
computer science
int *reverse(const int *, int); int *temp; temp = reverse(arr1,N); int *reverse(const int *arr1, int N) { int *arr2; arr2 = new int[N]; for(int count = 0; count < N; count++) { for(int index = (N1); index <= 0; index) arr2[count] … 
computer science
9.10: Reverse Array Write a function that accepts an int array and the array’s size as arguments. The function should create a copy of the array, except that the element values should be reversed in the copy. The function should … 
computer science
Im trying to create an arraylist that's sorted but I have no idea how to sort the numbers. I cant use the array.sort method here is my code: public class Testing { private int [] data; private int count; private static int defCapacity … 
programming
m trying to create an arraylist that's sorted but I have no idea how to sort the numbers. I cant use the array.sort method here is my code: public class Testing { private int [] data; private int count; private static int defCapacity … 
Calculus
Integrate x dx/(1x). I have proceeded thus Int xdx/(1x)=int (x1+1)/(x1) =Int[1+ 1/(x1)]dx =Int dxInt dx/(x1) =xlog(x1). On differentiating, we get original expression d/dx[xlog(x1)]=11/(x1)=x/(x1)=x/(1x). However, … 
computer science
IHow do you refractor this: public class Employee { private boolean isPartTime; private int seniority; private int monthsDisabled; public Employee(boolean isPartTime, int seniority, int monthsDisabled) { this.isPartTime = isPartTime; … 
calculus
use symmetry to evaluate the double integral (1+x^2siny+y^2sinx)dA, R=[pi,pi]x[pi,pi]. let g(x) and h(y) be two functions: int(c to d)int(a to b)(g(x,y)+h(x,y))dxdy=int(c to d)int(a to b)g(x,y)dxdy+int(c to d)int(a to b)h(x,y)dxdy