I have to read the test cast as follows.
3
ababa
abc
babac
c++ code to read the above input.
int main() {
int t;
cin>>t;
while(t--){
string s;
getline(cin,s);
cin.clear();
cout<<s<<endl;
}
return 0;
}
but the output I'm getting is
ababa
abc
can you help me how to read the last line?