Write a c++ program that does all of the following. Follow all of the instructio
ID: 650361 • Letter: W
Question
Write a c++ program that does all of the following. Follow all of the instructions including writing the 3 functions as described
Complete a base changer which converts to or from base 10 to any base 2<=base<=16. Build a menu-driven program that converts input as per user specification. The user may have a base b integer to convert to base 10, or a base 10 integer to convert to base b. So you might begin by asking:
Convert base b to base 10
Convert base 10 to base b
exit
For choice 1, you will need to get the base and convert the char sequence entered into base 10. For choice 2, you must use our mod/div algorithm (% /) to convert the int entered into the new base, storing the characters in an array as you go.
Write these functions:
Menu
Convert another base to base 10: Return an int answer given a string number and an int base.
Convert base 10 value to another base: return a string given an int number and an int base.
Explanation / Answer
#include<iostream.h>
#include<string.h>
int main()
{int ch;
string num1,ans2;
int b1,ans;
int num2,b2;
do{
cout<<
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.