Hello Sir!
How to take all the inputs given in the question? I can take only one input with my code.
Also, there seems to be a compilation error, can you pls help me with it?
int main() {
int rem = 0;
int dec = 0;
int base = 1;
cin >> bin;
while(bin!=0)
{
rem = bin % 10;
dec = dec + (bin * base);
bin = bin / 10;
base = base * 2;
}
return dec;
}