online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include<bits/stdc++.h> using namespace std; int main() { int t,i,j,k,l=0,p,q; cin >>t; for(i=0;i<t;i++) { string s; cin>>s; l=s.length(); int S=0; if(l%2==0) { for(j=0;j<l/2;j++) { for(k=l/2;k<l;k++) { if(s[j]==s[k]) { S=S+1; } else { S=S; } } } if(S==l/2) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } } else { for(p=0;p<l/2;p++) { for(q==(1+l/2);q<l;q++) { if(s[p]==s[q]) { S=S+1; } else { S=S; } } } if(S==l/2) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } } } return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue