Quiz 5, Thursday, 11/13

(20 minutes. Open notes)


Write a recursive function to compute the binary equivalent of a given positive integer n. The recursive algorithm can be described in two sentences as follows.
	Compute the binary equivalent of n/2. Append 0 to it if n is even; append
	1 to it if n is odd.
Use the following header for the function:
	string binaryEquivalent(int n);
To append a "0" or a "1" to a string, you should use the string concatenate operation "+".