0为false所以循环终止
#includeusingnamespacestd;doublepower(doublex,intn);intmain(){intvalue=0;cout>i;cout0;i--){charch;cin>>升搜察ch;if(ch=='1'漏旦)value+=static_cast(power(2,i-1));}cout<<吵茄"Decimalvalueis"<