title: White space elimination for 24 and 124
body: <pre><code>int main() {
    unsigned int low, high, i;
  
    do {
      cout &lt;&lt; "Enter lower and upper values" &lt;&lt; endl;
  
      cin &gt;&gt; low &gt;&gt; high;
  
      if (low &gt; high) {
        cout &lt;&lt; "Values must be in range 32 to 126 inclusive" &lt;&lt; endl;
      } else if ((low &lt; 32 || low &gt; 126) || (high &lt; 32 || high &gt; 126)) {
        cout &lt;&lt; "Values must be in range 32 to 126 inclusive" &lt;&lt; endl;
      }
    } while (low &gt; high || low &lt; 32 || low &gt; 126 || high &lt; 32 || high &gt; 126);
  
    cout &lt;&lt; "Characters for ASCII values between " &lt;&lt; low &lt;&lt; " and " &lt;&lt; high
         &lt;&lt; endl;
  
    cout &lt;&lt; "----+----+----+----+" &lt;&lt; endl;
  
    for (i = low; i &lt;= high; i++)
    {
      cout &lt;&lt; (char)i;
  
      if ((i - low + 1) % 20 == 0)
      {
        cout &lt;&lt; endl;
      }
    }
  
    cout &lt;&lt; "\n----+----+----+----+" &lt;&lt; endl;
  
    return 0;
  }
  </code></pre>
  
  <p>Output is nearly correct; but whitespace differs. See highlights below. 
  Special character legend
  Input</p>
  
  <pre><code>65 124
  </code></pre>
  
  <p>Your output</p>
  
  <pre><code>Enter lower and upper values
  Characters for ASCII values between 65 and 124
  ----+----+----+----+
  ABCDEFGHIJKLMNOPQRST
  UVWXYZ[\]^_`abcdefgh
  ijklmnopqrstuvwxyz{|
  
  ----+----+----+----+ // white space below ijklmnopqrstuv........
  </code></pre>
  
  <p>Expected output</p>
  
  <pre><code>Enter lower and upper values
  Characters for ASCII values between 65 and 124
  ----+----+----+----+
  ABCDEFGHIJKLMNOPQRST
  UVWXYZ[\]^_`abcdefgh
  ijklmnopqrstuvwxyz{|
  ----+----+----+----+
  </code></pre>
  
  <p>I cannot figure out how to eliminate the white space in my output when the lower is 65 and the upper value is 124. The program is correct for 32 and 126 and for other values as well but I dont understand why I am getting a white space at the end for 65 and 124.</p>