title: Don't print space after last number
body: <p><strong>LANGUAGE: C++</strong>
  Hello, in the following function (code block) i have written a line to print an space between characters but <strong>i don't want print spaces after last characters</strong>. How can i solve this problem?</p>
  
  <pre><code>bool perfecto(int n)
  {
      int suma, i;
      suma = 0;
      for (i = 1; i &lt; n; i++)
      {
          if (n % i == 0) 
          {
              suma += i;
              cout &lt;&lt; i &lt;&lt; " ";
          }
      }
      if (suma == n)
          return true;
      else
          return false;
  }
  </code></pre>
  
  <p>Best regards.
  Ángel Manuel.</p>