Ultra-Fast-Mathematicians, whats wrong in this code

#include
using namespace std;
int main() {
int t;
int x;
int y;
cin>>t;
int arr[100];
int i=0;
while(t–){
cin>>x>>y;

  while(x!=0 && y!=0){
  if((x%10)==(y%10)){
      arr[i]=0;
  }else{
      arr[i]=1;
  }
  i++;
  x=x/10;
  y=y/10;

}
for(int j=i-1;j>=0;j–){
cout<<arr[j];
}
}
}

@Rishabhsharm hey rishabh your code is not working for multiple test set do one thing
take a empty string a compare both input string if both instances equals append 0 to new string else append 1 to the string and print the string.