Computer Science, asked by devyanshi013, 5 months ago

c code to solve
N-base notation is a system for writing numbers which uses only n
different symbols. These symbols are the first n symbols from the
given notation list (including the symbol for 0). Decimal to n-base
notations are {0:0, 1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, 10:A,
11:B and so on up to 35:7).
Implement the following function:
char* DectonBase(int n, int num);
The function accepts positive integers 'n' and 'num'. Implement the
function to calculate n-base equivalent of 'num' and return the same
as a string.
Steps:
1. Divide the decimal number nun by n. Treat the division as
an integer division.
2. Write down the remainder (in n-base notation).
3. Divide the quotient again by n. Treat the division as an
integer division.
4. Repeat step 2 and 3 until quotient is 0.
ho
5. The n-base value is the sequence of the remainders from the
last to first.
Assumption: 1 <n<= 36
Example:
Input:
num: 718
Output:
Explanation:
divisor quotient remainder
12
59
10 (A)
59
11 (B)
12
4 (4)
On reversing remainders, output becomes 4BA.
12
4
Sample Input
7:21​

Answers

Answered by ss3763466
0

Answer:

u r right to do it for you to do the needful at your convenience of learning and smart ways of the garments is a polynomial the displacement of the cylinder head gasket set of learning the ropes course the cylinder head gasket set up a world class library system the cylinder

Explanation:

the stock market the following ions to the

Similar questions