Computer Science, asked by srikanth42079, 6 months ago

Ir
Problem statement
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 ist (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:2}.
Implement the following function:
char* DectonBase(int n, int num);
No
R
The function accepts positive ntegers '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 num by n. Treat the division as an
nteger division
2. Write down the remainder (n n-base notation)
3. Divide the quotient agan by n. Treat the division as an
nteger division
4. Repeat step 2 and 3 unti quotient is 0.
5. The n-base value is the sequence of the remainders from the
last to frst.
Assumption:1 Example:
Input:
12
num:718
Output:
Esplanations
dvisor quotient reminder
70
59
592
Onteng readers to becomes SA
Sample Input
Sample Output

Answers

Answered by nidak2132
0

Answer:

can't understand.............

Similar questions