In general, n-bit Gary code: (1) Reverse copy the (n-1)-bit Gray code: (2) Add 0 to the left of the first half and add 1 to the left of the second half.
Write a C++ recursive function for generating an n-bit Gray code using the above algorithm. You must use the code (attached). Do not use other algorithm nor copy form what you find online. I will not accept your assignment you do not use this algorithm.
Must use same ALGORITHM will NOT accept if you use other algorithms.
Attachment:- Code.rar