Help me in solving STCV213 problem

My issue

Rearrange the following code
include
using namespace std;
int main() {
int t;
cin>>t;
while(t–)
{
string s,n=“yes”;
cin>>s;
cout<<n<<endl;
if(s[i]==s[i+1])
break;
n=“no”;
for(int i=0;i<s.length();i=i+2)
{
{
}
}
}
return 0;
}

Learning course: Beginner DSA in C++
Problem Link: Review problem - 2 in Beginner DSA in C++

@avneeshkumar87
this will be the correct rearrangement

#include <iostream>
using namespace std;
int main() {
    int t;
    cin>>t;
    while(t--)
    {
    string s,n="yes";
    cin>>s;
    for(int i=0;i<s.length();i=i+2)
    {
        if(s[i]==s[i+1])
        {
            n="no";
            break;
        }
    }
    cout<<n<<endl;
    }
	return 0;
}