JavaScript is required to use Bungie.net

Forums

Edited by Tringus: 3/29/2016 8:39:06 PM
8
public class Easy { public int recursion (int x) { if (x == 0) return 0; else if ((x % 2) == 0) return 1 + recursion (x -1); else return 2 + recursion (x-1); } } What is returned by recursion(5)? Correct answer when someone gets it: [spoiler]8[/spoiler]
English

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

You are not allowed to view this content.
;
preload icon
preload icon
preload icon