对了5点 ,错了1点 T-T

林汐  •  3个月前


include<bits/stdc++.h>

//#include //#include //#include using namespace std; int main() {

int a,b,c,d,e;
cin>>a;
b=a%10;//Ones
c=a/10%10;//Tens
d=a/100%10;//Hundreds
e=a/1000;//thousand
if(b!=0){
    cout<<b;
        }
        if(c>=0,b>=0){
            cout<<c;
			}
            if(d!=0,c>=0,b>=0){ 
                cout<<d;
	        }
                if(e!=0){
                   cout<<e;}
                    return 0;

}


评论:

用逗号连接只会判断逗号后的表达式。


lgh  •  3个月前