Run ID:125032
提交时间:2025-07-13 10:02:48
#include<iostream> #include<cstring> using namespace std; int main(){ //strcpy( , ) 将字符数组~复值给~ //strcat( , ) 字符数组拼接 //strcmp(a,b) a>b cout<<"1" a==b cout<<"0" a<b cout<<"-1"; char a[50],b[50]; cin>>a>>b; int q=strlen(a); for(int i=0;i<q;i++){ if(a[i]=='1' and b[i]=='1'){ cout<<"1"; }else{ if(a[i]=='1' and b[i]=='0'){ cout<<"0"; }else{ if(a[i]=='0' and b[i]=='1'){ cout<<"0"; }else{ if(a[i]=='0' and b[i]=='0'){ cout<<"1"; } } } } } return 0; }