HI , my problem is the no. keep on multiplying.
plz check my code.
Conversion from binary to decimalfor n binary numbers
You are using wrong approach in your code for conversion,
int ans=0;
int pos=1;
while(N>0)
{
int rem=N%10;
ans=ans+rempos;
N=N/10;
pos=pos2;
}
cout<<ans<<endl;
}
Plz modify your code accordingly.