title: Loop efficiency - C++
body: <p>Beginners question, on loop efficiency. I've started programming in C++ (my first language) and have been using 'Principles and Practice Using C++' by Bjarne Stroustrup. I've been making my way through the earlier chapters and have just been introduced to the concept of loops. </p>
  
  <p>The first exercise regarding loops asks of me the following:
  The character 'b' is char('a'+1), 'c' is char('a'+2), etc. Use a loop to write out
  a table of characters with their corresponding integer values:</p>
  
  <p>a 97, b 98, ..., z 122</p>
  
  <p>Although, I used uppercase, I created the following:</p>
  
  <pre><code>int number = 64; //integer value for @ sign, character before A
  char letter = number;//converts integer to char value
  int i = 0;
  
  while (i&lt;=25){
      cout &lt;&lt; ++letter &lt;&lt; "\t" &lt;&lt; ++number &lt;&lt; endl;
      ++i;
      }
  </code></pre>
  
  <p>Should I aim for only having 'i' be present in a loop or is it simply not possible when converting between types? I can't really think of any other way the above can be done apart from having the character value being converted to it's integer counterpart(i.e. opposite of current method) or simply not having the conversion at all and have letter store '@'.  </p>