title: ROT-13 using the entire printable ASCII Character Set C++
body: <p>I am trying to create a code that will use the entire printable ASCII Character set. My problem is that when it comes to characters that will be a number higher than 126 they print as '?', except for 'r', which prints correctly. Why does my code allow 'r' to roll back up to a printable character but not any characters after that? (stuvwxyz{|}~)</p>
  
  <p>" Please enter your password.</p>
  
  <p>abcdefghijklmnopqrstuvwxyz{|}~</p>
  
  <p>nopqrstuvwxyz{|}~!???????????? "</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  void encrypt(string password)
  {
  
  int count = 0;
  char i;
  
      for (count = 0; count &lt; password.length(); count++)
      {
          i = password.at(count) + 13;
              if (i &gt;= 127)
                  {
                      i = 32 + (i - 126);
                      cout &lt;&lt; i;
                  }
              else 
                  cout &lt;&lt; i;          
      }
      return;
  }
  
  int main()
  {
      string password;
  
      cout &lt;&lt; "Please enter your password." &lt;&lt; endl;
      cin &gt;&gt; password;
  
      encrypt(password);
      cout &lt;&lt; "\n";
      return 0;
  }
  </code></pre>