i am getting single output if i am inputing single binary number.but the question says we have to input N binary number at one go and get corresponding output. How to do that?I have tried everything.
Inputing binary number together
i have shared a code
#include using namespace std; int main() { int N,r,dec=0,b=1; cout<<“enter binary number:”; cin>>N; while(N!=0) { r=N%10; dec=dec+rb; b=2b; N=N/10; } cout<<dec; return 0; }
please save your code on the online ide of coding blocks. it’s difficult for me to debug
its getting deleted how to save??
open the coding blocks ide. paste your code on that ide and click on the save button. then share the link over here
my question is done thanks. No need of help anymore…