title: What is the algorithm for backward alphabet?
body: <p>I try to write a function in C which will map the alphabet with the reversed order of it. For example, letter 'a' will be replaced by letter 'z' or 'B' by 'Y' (case sensitive). It will not transform the punctuation marks and spaces.</p>
  
  <p>I wrote main parts of code, but I could not find algorithm or formula for backward alphabet.</p>
  
  <p>Edit: Here is my work;</p>
  
  <pre><code>void backward_alphabet()
  {
      int i;
      for (i=0;sentence[i]!='\0';i++) {
          if ((sentence[i]&lt;='z') &amp;&amp; (sentence[i]&gt;='a'))
              sentence[i] = 'z' - sentence[i] + 'a';
          else if ((sentence[i]&lt;='Z') &amp;&amp; (sentence[i]&gt;='A'))
              sentence[i] = 'Z' - sentence[i] + 'A';
          else continue;
      }    
  }
  </code></pre>
  
  <p>Now its work.</p>