Computer Science, asked by salmansiddiqui7035, 1 year ago

list the step to convert a number in any base to its eqlivalent base to (decimal) number​

Answers

Answered by shubhgoswami68
1

Explanation:

Given a number and its base, convert it to decimal. The base of number can be anything such that all digits can be represented using 0 to 9 and A to Z. Value of A is 10, value of B is 11 and so on. Write a function to convert the number to decimal.

Examples:

Input number is given as string and output is an integer. Input: str = "1100", base = 2 Output: 12 Input: str = "11A", base = 16 Output: 282 Input: str = "123", base = 8 Output: 83

hope it will we help full to you

thank you dear

Similar questions