void PrintRoutine::go()
{
    int j;
    while (true)
    {
        for (j = 0; j < k; j++)
            cout << Word1[j];
        resume(rspc);
        for (j = k - 1; j >= 0; j--)
             cout << Word1[j];
        resume(rspc);
    }
} 

Example 6: Print5Routine prints the first word in order and the second word in reverse.

Back to Article