Question: C program to convert an entered decimal number and display it as an radix-n value on the screen. (where n E {2,3,4,..,16)). a) Write a
C program to convert an entered decimal number and display it as an radix-n value on the screen. (where n E {2,3,4,..,16)).
a) Write a code to your program that will prompt an external user to enter an integer decimal number and display it on the screen.
b) ) Add code to your program that will prompt an external user to enter an integer between 2 and 16, which will be the radix of the number system that we will convert our decimal value to, and display it on the screen
c) Modify your program so that it, continuously prompts the user to enter a decimal number and radix and display it on the screen, until the user types in a number less than 0. After which the program should terminate and display the message EXIT on the screen.
d) Now find the log(base2)n of the entered decimal number and display the result to the screen.
e) Now display the entered decimal number divided by the radix and display the integer result to the screen.
f) Now display the remainder of the decimal number divided by radix and display the result to the screen.
g) Write out the step by step algorithm to convert an integer decimal number into any radix-n value (where n {2,3,4,...,16})
h) Create a function called char* Dec2RadixN(int decValue, int radValue) which takes in the decimal number and the radix value entered by the user and displays the equivalent radix-n number
i) Ensure that your main.c file is well commented
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
