Sun Nov 22, 2009 4:00 pm
Write a program to convert a number from decimal notation to a number expressed in a number system whose base (or radix) is a number between 2 and 9.
The conversion is performed by repetitious division by the base to which a number is being converted and then taking the remainders of division in the reverse order. For example, in converting to binary, number 6 requires three such divisions: 6/2=3 remainder 0, 3/2=1 remainder 1, and finally, 1 /2=0 remainder 1. The remainders 0,1 and 1 are put in reverse order so that the binary equivalent of 6 is equal to 110
Thanks!!!
Fri Nov 27, 2009 2:39 pm
you have to try coding by your self and any problem share with us .
As i see from the explanation provided , that it will be a loop , and devision and appending on a String .
Just try this :
java/binary-conversion-t10193.html
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.