Question: In C Write a program called lab7.c. Your lab7.c program should convert an integer into another base. The input integer could be in binary, decimal,
In C

Write a program called lab7.c. Your lab7.c program should convert an integer into another base. The input integer could be in binary, decimal, octal or hexadecimal. The output could be converted into any of the bases (except for binary). A sample run is below. The user's response is in boldface. Note that if the input is in binary, you must read it in as a string and convert it to the output base. I am not requiring you to output numbers in b inary Base of input integer: Enter b for binary, d for decimal, h for hexadecimal or o for octal Enter the number: 178 Enter the base of the output (d, h or o): h Do you wish to do another? (Y or N): Y Base of input integer: Enter b for binary, d for decimal, h for hexadecimal or o for octal The integer 178 in decimal is b2 in hexadecimal 0 Enter the number: 423 Enter the base of the output: d The integer 423 in octal is 275 in decimal Do you wish to do another? (Y or N): N
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
