Question: use c++ AT&T 6:30 PM ant Detail- Implement a function void convert(int number, int b); The function will output the number in the given base

AT&T 6:30 PM ant Detail- Implement a function void convert(int number, int b); The function will output the number in the given base b. It should work for any base from 2 to 36 and any positive number. Use number %b to get the rightmost digit in the given base. Then use number /= b to strip off the rightmost digit. Use a stack (not recursion) to store the digits as you get them. After all the digits are stored on the stack, use a loop to output the digits in correct order. For digits bigger than 9 (i.e. when base is > 10) use char( 'A' - 10 + digit) to output the base-b letter corresponding to the digit. You may #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
