title: For loop prints an extra comma
body: <pre><code>cout&lt;&lt;&quot;Set B : {&quot;;
  for(i=0;i&lt;b;i++)
  {
      cout&lt;&lt;setB[i];
      cout&lt;&lt;&quot;,&quot;;
  }
  cout&lt;&lt;&quot; }&quot;&lt;&lt;endl;
  </code></pre>
  <p>The code above is not printing correctly. It should print <code>Set B : {1,2,3}</code>  but it prints an extra comma ==&gt; <code>Set B : {1,2,3,}</code></p>