X273: Recursion Programming Exercise: Decimal to Binary

For function decToBinary, write the missing parts of the recursion case. This function should return a string that stores the binary equivalent for int variable num. Example: The binary equivalent of 13 may be found by repeatedly dividing 13 by 2. So, 13 in base 2 is represented by the string "1101".

Examples:

decToBinary(13) -> "1101"

Your Answer:

Feedback

Your feedback will appear here when you check your answer.