title: Taking input of a string
body: <pre><code>#include &lt;bits/stdc++.h&gt;
  using namespace std;
  
  string solve(string s){
      cout &lt;&lt; &quot;inside solve&quot;;
      for(int i=0; i&lt;s.length(); i++){
          int occur=0;
          while(i+1 &lt; s.length()){
              if(s[i] == s[i+1])
                  occur++;
          }
          if(occur%2!=0 &amp;&amp; occur%3!=0 &amp;&amp; occur%5!=0)
              return &quot;no&quot;;
      }
      cout &lt;&lt; &quot;inside solve&quot;;
      return &quot;yes&quot;;
  }
  
  int main(){
      ios_base::sync_with_stdio(0);
      //cin.tie(0); cout.tie(0);
      int tc;
      cin &gt;&gt; tc;
      //cout &lt;&lt; tc;
      while(tc--){
          string s;
          cin &gt;&gt; s;
          //cout &lt;&lt; &quot;Inside main's while&quot;;
          cout &lt;&lt; solve(s);
      }
      return 0;
  }
  </code></pre>
  <p>In my main function after I'm inputting the string nothing is happening. Is there some problem in using cin &gt;&gt; s. Also when I'm uncommenting the line cin.tie(0); cout.tie(0);
  It is not going inside while loop too. So what is happening?</p>