Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • This converts a binary integer, not a decimal number. Commented Jun 17, 2017 at 10:28
  • @EJP Hello. Could you clarify your comment? I am not saying you are wrong but I am not sure what you mean. From what I see question is about creating binary representation of integer provided in decimal system (I am not sure if OP wants to return String or int here so didn't focus on that). Also this answer wasn't meant to provide working solution (since it is clearly homework question about recursion) but to point few mistakes which OP made in his code. Commented Jun 17, 2017 at 15:12