please i need someone to help write a program that receives some sets of binary numbers and convert to decimal..... using C++
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....
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 ?
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..