You are viewing a single comment's thread. Return to all comments →
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */
int testCase; string Teststring; cin>>testCase; for(int i=0;i<testCase;i++){ string oddString=""; string evenString=""; cin>>Teststring; int len=Teststring.length(); int j=0; while(j!=len){ if(j%2==0){ evenString=evenString+Teststring[j]; } else{ oddString=oddString+Teststring[j]; } j++; } cout<<evenString<<" "<<oddString<<endl; } return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Day 6: Let's Review
You are viewing a single comment's thread. Return to all comments →
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */
}