Jiskha Homework Help
SATURDAY
November 21, 2009
SCHOOL SUBJECTS
- Art
- Business
- Computers
- English
- Foreign Languages
- Health
- Home Economics
- Math
- Music
- Physical Education
- Science
- Social Studies
GRADE LEVELS
- Preschool
- Kindergarten
- Elementary School
- 1st Grade
- 2nd Grade
- 3rd Grade
- 4th Grade
- 5th Grade
- 6th Grade
- 7th Grade
- 8th Grade
- High School
- 9th Grade
- 10th Grade
- 11th Grade
- 12th Grade
- College
- Adult Education
Post a New Question | Current Questions | Chat With Live Tutors

Homework Help Forum: Computers

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

First Name:
School Subject:
Answer:

SEARCH

COMMUNITY
FEATURES
- Live Tutors
- Net Riddle
- Reference
- Search