title: Data input to a two dimensional array in pseudo code
body: <p>The problem is that I am not sure how to load the data from keyboard to a two dimentional array when column number is unknown. Specifically, I need a program to store students' grades for 4 subjects whithout knowing the actual number of students. </p>
  
  <p>I have come up with this (I am fairly certain that the decision is faulty, but it's the best I've got so far):</p>
  
  <pre><code>Declare Grades as dynamic two dimentional array of int
   Loop: Subject = 1 to 4
   Print 'Enter students grades for subject' + Subject#
   Print 'Enter * when done'
   If Grades &lt;=100 &amp;&amp; Grades &gt;=0 then
    While Grades &lt;&gt; '*'
     Enter Grades w/o cursor return
    WhileEnd
    Else
     Print 'Enter a valid grade'
   EndIf
   LoopEnd: Subject
  </code></pre>
  
  <p>I guess that it's not clear from this code how the Subject loop functions, i.e. when it goes from subject1 to subject2 and so on. I initially thought that to achieve the goal I would simply need to return cursor (which would have been done after a user entered '*'), but it's hardly true, is it?</p>
  
  <p>So could you please-please help me understand this problem better?</p>
  
  <p>Thank you.</p>