+ 1

How could we write a code in c++ language to change some digits into binary codes?

9th Mar 2018, 2:27 PM
bahareh_rzm
bahareh_rzm - avatar
1 Resposta
+ 3
I guess you want to convert a decimal number into a binary number? There are two algorithms for that: The "Euclidian algorithm" and the "Horner scheme". Just google them, there are some good explanations. If you want a solution, take a look at my codes, I implemented both algorithms a while ago. But I advise trying the figure out the solution yourself, you'll learn a lot more from that.
9th Mar 2018, 3:43 PM
Chris
Chris - avatar