Question
Write a C programme that converts a number given in base bi to another base bo requested by the user. The output of the programme
Write a C programme that converts a number given in base bi to another base bo requested by the user.
The output of the programme should look something like this:
Please enter the number N to be converted:
34
Please enter the input base (the base of the number to be converted):
8
Please enter the output base (the base into which the number is to be converted):
10
Assume that the number N to be converted is specified as a string for example ike 123A (base:16) or 34 (base 5) and also allow numbers with decimal points and negative numbers to be converted as well.The final result should also be a string like 11001 or -457.The input and output bases should be integers.
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