0

please i need someone to help write a program that receives some sets of binary numbers and convert to decimal..... using C++

4
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by thekashyap
0

i have a textbook i am using for my c++, that is one of the questions inside, i just didnt know where to start because if i have to convert a set of numbers to decimal, then i have to know the length of the numbers or the number of input digits, i wrote the program to work for four-digit binary numbers but the question didnt specify the length i.e it can be any length, :confused: and that is where i am having problems....

0

first you need to post the code you have already written. The answer to your question depends on what kind of strings you are using -- std::string class or character arrays ?

0

If you can convert using a pen and paper, you should be able to write down a small algorithm. Start from there..
If you donno how to convert binary to decimal itself, you need to read that some place else..

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.