ww.codechef.com/problems/REVWORDS why in this problem we are doing t++ please

explain why we are doing t++
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
t++;
while(t–)
{
string str;
getline(cin,str);
stringstream s(str);
string word;
list l;
string s1;
while(getline(s,word,’ '))
{
l.push_back(word);

}
l.reverse();
for(auto it=l.begin();it!=l.end();it++)
{
    s1=s1+*(it)+" ";
}
s1.pop_back();
cout<<s1<<endl;

}
return 0;
}

It’s your code; you tell us!

Anyway, if you mean “why does it fail if I don’t do it” - because you haven’t read the first part of this post :stuck_out_tongue:

1 Like

this is my number 9109775320 mess me ,i need some help