Question
C++ lanuage only Part 1 Write a program that uses a recursive function to convert a number in decimal to a given base b, where
C++ lanuage only Part 1 Write a program that uses a recursive function to convert a number in decimal to a given base b, where b is 2, 8, or 16. Your program should prompt the user to enter the number in decimal and the desired base. Test your program on the following data: 9098 and base 8 692 and base 2 753 and base 16 Sample output: Please enter a number? 4598 Please enter a base between 2 and 16? 8 The decimal number 4598 is equal to 10766 in base 8. Please enter a number? 25354 Please enter a base between 2 and 16? 16 The decimal number 4598 is equal to 630A in base 16.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started