Originally posted by: MSCoder610
Nevermind, with your compiler it probably already initialized it to zero. I tried 35+35 and it says 70(dec) but 10(base 6) which is obviously wrong. The basic problem is that you're finding the base 6 digits correctly, but then just adding them to result (with no place value). You did it correctly with the decimal conversion, so do something similar:
...
result += (num % 6) * pow(10,counter++);
...