This is indeed very strange.
You seem to have two distinct questions:
- convert a number into a different base, base n. This is very simple, so I don't think you have a problem here.
- find out what number n is. That is difficult because no one has defined n for you, just given an example using numbers conjured out of thin air!
The statement of the problem is odd to me: if n is to be computed from 5, why say (d)? And in your example, it is computed from 7, 6 and 2. If this really means (d), 6 and 2, why is 7 given a name (d) and 6 and 2 are not given names?
DId i calculate n right? CAN SOMEONE TELL ME IF I CALCULATED N RIGHT OR IF IM DOING SOMETHING WRONG. PLEASE!
So I can't tell you if you used the right formula. Using the formula you gave as an example,
and assuming % means modulo and : means nothing, then
5 % 6 + 2 <> 3 so your calculation is in error.
if % means integer division and : means nothing, then
5 % 6 + 2 <> 3 so your calculation is in error.
I can't tell which of these is the correct error, since 7 mod 6 = 1 and int( 7/6) =1 so your % could be either, but this is where your calculation seems to err, unless you can suggest another meaning for the % symbol or the : symbol.