How to stop the setw
<p>I'm trying to create a matrix for an assignment and I've set the width. The cout matrix pop up well and nice. But the  <strong>**</strong> name thing I want to create is messed up. I want to set again to create a nice name design using setw and setfill. It doesn't set it properly. What is wrong. Thank you</p>

<p>ex 1  2  3
   4  5  6</p>

<hr>

<h2>-nice-</h2>

<pre><code>#include &lt;iostream&gt;
#include &lt;iomanip&gt;

using namespace std;

int main()
{
    int max=0;
    int mat [10][10];

    for (int i=0; i&lt;10; i++)
    {
        mat[i][0] = (i+1); 
    }
    for (int j=0; j&lt;10; j++)
    {
        mat[0][j] = (j+1); 
    }

    for(int k=1, j=0; k&lt;10; k++, j++)
    {
        for(int l=1, i=0; l&lt;10; l++, i++)
        {
            mat [k][l] = mat[j][i] + mat[j+1][i] + mat[j][i+1];
        }
    }

    for (int i=0;i&lt;10;i++)
    {
        for (int j =0; j&lt;10; j++)
        {
            cout&lt;&lt;setw(8);
            cout&lt;&lt;mat[i][j];

            if(mat[i][j]&gt;max)
                max=mat[i][j];

        }
        cout&lt;&lt;endl;
    }

    {
        cout &lt;&lt; setfill ('x')&lt;&lt; setw (26)&lt;&lt;endl;
        cout&lt;&lt;"xCode by MEx"&lt;&lt;endl;
        cout&lt;&lt; setfill ('x')&lt;&lt; setw (26)&lt;&lt;endl;
    }

    cout&lt;&lt;"The maximum value is \n"&lt;&lt;max&lt;&lt;endl;

    system("PAUSE");

    return 0;
}

//study c++
// apache
</code></pre>
