× Didn't find what you were looking for? Ask a question
Top Posters
Since Sunday
w
3
w
3
e
3
3
r
3
b
2
M
2
V
2
f
2
c
2
c
2
K
2
New Topic  
DePeet DePeet
wrote...
Posts: 338
Rep: 0 0
6 years ago
Rewrite the following iterative method as a recursive method that computes the same thing.  Note:  your recursive method will require an extra parameter.
   public int iterative1(int x)
   {
      int count = 0, factor = 2;
      while (factor < x)
      {
         if (x % factor == 0) count++;
         factor++;
      }
      return count;
   }
Read 74 times
1 Reply
Replies
Answer verified by a subject expert
StingerStinger
wrote...
Posts: 310
Rep: 4 0
6 years ago
Sign in or Sign up in seconds to unlock everything for free
1

Related Topics

DePeet Author
wrote...

6 years ago
This calls for a celebration Person Raising Both Hands in Celebration
wrote...

Yesterday
Thank you, thank you, thank you!
wrote...

2 hours ago
Thanks for your help!!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  505 People Browsing
Related Images
  
 381
  
 343
  
 2047
Your Opinion
What percentage of nature vs. nurture dictates human intelligence?
Votes: 437

Previous poll results: What's your favorite coffee beverage?