Subtracting at the beginning of a string
<p>I have a string that I need to keep subtracting from the beginning while the letters continuously move as well. For example:</p>

<blockquote>
  <p>ABC DEF GHI JK needs to look like this 
  BCD EFG HIJ K and then
  CDE FGH IJK</p>
</blockquote>

<p>I have some code, but the letters are not moving individually:</p>

<pre><code>int main()
{
    string code, default_Code;
    default_Code = "TCAATGTAACGCGCTACCCGGAGCTCTGGGCCCAAATTTCATCCACT";         
    start_C = "AUG";
    code.reserve(100);
    int i = 0, a = 0, c =0;
    char choice;

    for (int j = 3; j &lt; code.length(); j += 4)   // Creating space between 3 letters
    {
        code.insert(j, 1, ' ');
    }

    do {
        i = 0;
        do {                                                // Looping to create an open reading frame.
            for (int b = 0; b*3 &lt; code.length(); b++) {         //  moving through the code 
                for (int a = 0; a &lt; 3; a++) {
                    cout &lt;&lt; code[(a + b*3) + i];
                }
            }
            i++;
            cout &lt;&lt; endl;
        } while (i &lt; 3);

        reverse(code.rbegin(), code.rend());            // Reversing to create the second set reading frame.

        c++;
        cout &lt;&lt; endl; 

    } while (c &lt; 2);
    return 0;
}
</code></pre>
