Binary to decimal


this is my code. I feel the mistake is that I am not able to multiply 2^n with x in my code. Please help with that and check my code. right now it’s incorrect.

hi @akshat1409 that’s xor operator for power
eg x power n you have to write pow(x,n)
so replace that line by decimalno= x*pow(2,pos);
also server is down so try later :slight_smile: