// From any base from(2:9) To Decimal.
using namespace std;
cout<<"Enter Base Number :";
cout<<"\n Enter Bits of number : ";
cout<<"\n Enter number : ";
if(counter==bit ) // program come to here and don't complete.
decimal=Quotient*b+arry[i]; // i have warning here.
while( i>=0 );
cout<<"\nDecimal Number is :"<<decimal;
I Hope Someone Get Solution Soon
and Write The Correct Code.
Please use codetags when posting code to the forum (Highlight your code and click the <> button under format) it makes it much easier to read the code you post.
Also what is your question exactly? You say its not giving you the correct answer but what is the correct answer? What is your program suppose to do? What are you having trouble understanding? Please be detailed about the problems you encounter when you post a question :).
One thing I noticed just off the bat without knowing what problems you are experiencing is this
1 2 3
Why do you have them brackets there?
Is very hard to read. It is better to have them each on their own line when you are assigning to them.
1 2 3
int j = 0;
int Quotient = 0;
int counter = 0;
Also make sure you are using the same style consistently. By this I mean notice how one of the them variable names starts with a uppercase letter and all the others don't? It seems very minor but it will actually cause a lot of confusion later.
But anyways them are just minor things, so let us know what exactly your problem is and we will do our best to help guide you in the right direction (We won't just give you the code ;p).