Problem 44971. Convert base 10 to base x (2-16)
Solution Stats
Problem Comments
-
9 Comments
Oh, the problem was with my algorithm, sorry. I am indeed using python's long int (for multiplication of large integers), but I was relying on str2num for some operations (which apparently introduced floats back in my code). After removing it, it worked out fine.
PS: This new update knocked out some wrong solutions (including some of mine). Awesome. :)
In each of test3, test4 and test5, there is a number with a decimal fractional part 0.0962. It appears as thought it was converted in each case as though the fractional part was 0.962.
Corrected tests 3,4,5. Answers should all be good now.
Solution Comments
Show commentsProblem Recent Solvers2
Suggested Problems
-
10364 Solvers
-
626 Solvers
-
526 Solvers
-
610 Solvers
-
Matlab Basics - Create a row vector
310 Solvers
More from this Author57
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!