EmadMoh178

Untitled

Aug 4th, 2021
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. #include<algorithm>
  4. using namespace std;
  5.  
  6. int main()
  7. {   string s,t;
  8.     int n;
  9.    
  10.     cin>>n;
  11.    
  12.    
  13.     while(n--){
  14.          
  15.         s.clear();
  16.         t.clear();
  17.        
  18.         cin>>s>>t;
  19.        
  20.         for(int i=0;i<max(s.size(),t.size());i++){
  21.             if(isalpha(s[i]))cout<<s[i];
  22.             if(isalpha(t[i]))cout<<t[i];
  23.         }
  24.         cout<<"\n";
  25.     }
  26.    
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment