Question: If someone could help me with this code that would be great. It needs to be done in C++ and has to have a stack
I. Write a program to convert a number from decimal notation to a number expressed in a number system whose base (or radix) is 2 (binary), 8 (octal), or 16 (hexadecimal). The conversion is performed by repetitious division by the base to which a number is being converted and then taking the remainders of division in the reverse order. For example, in converting to binary, number 6 requires three such divisions: 6/2 = 3 remainder 0, 3/2 = 1 remainder l, and finally. I /2 = 0 remainder l. The rermainders 0, I and I are put in reverse order so that the binary equivalent of 6 is equal to 110. Here is a set of requirements to follow . Type the homework number and your full name at the top in your source code. /* Homework #3, James Bond */ A hexadecimal system requires 16 digits: 0. I, ..., 9. A, B. C, D, E. F. In this system, decimal number 26 is equal to IA in hexadecimal notation because 26/16 = 1 remainder 10 (that is, A). and 1/ 16 = 0 remainder l . Your program should be a menu-driven and execute the chosen command. If you type 3, then exit the program. MENU Binary (0), 0ctal (1), Hexadecimal (2) Exit Program (3) Choose .Include a stack, which is implemented as a linked list. . Show your ALL work. For example, MEN U Binary (0), Octal ), Hexadecimal (2) Exit Program (3) Choose? 0 6 1 1 0 MENU Binary (0), Octal (1),Hexadecimal (2) Exit Program (3) Choose?1 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
