How to remake this cycle
<p>here is my code which needs to make a check about a student by his faculty number, and if there is no information to say that ...</p>

<pre><code>cout&lt;&lt;"Enter faculty number of the student(8 digits): "&lt;&lt;endl;
cin&gt;&gt;ch;
cout&lt;&lt;"Information about student with number:"&lt;&lt;ch&lt;&lt;endl;
    for(i=0;i&lt;n;i++)
    {
        if(m[i][0]==ch)
        {
            for(j=0;j&lt;4;j++)
                cout&lt;&lt;setprecision(8)&lt;&lt;m[i][j]&lt;&lt;"\t";
        }
        else if(m[i][0]!=ch)
        {
            cout&lt;&lt;"No information about this student"&lt;&lt;endl;
        }
    }
</code></pre>

<p>it works mostly fine, the problem is that if my "n"(number of student typed out of this code) is 3 ... we will have 3 student and the cycle "for" will be made 3 times .. and we type 1 student (actually we are typing 1 faculty number) when i start the program it says whole information about that student and on two new lines it says "No information about this student". 
I cant put the IF check out of that FOR with N because i need to roll the m[i]... thanks</p>
