title: while loop for scanning user input table into array
body: <p>I am a super unintuitive beginner programming student working on a homework assignment. The program is to take an input table of hockey teams and game stats, calculate "points", and then output the table organized in a different way, with additional columns for points and games played. </p>
  
  <p>So far, I haven't made it past scanning the input. With my while loop, I'm trying to first determine if the string is a conference name or a team name and then scan and store the subsequent table values accordingly. I'm just trying to print the same table back out at this point, but when i copy/paste the input input table which was given, I get no output, and when I manually type it in, it comes out suuper weird.</p>
  
  <p>The input table looks something like this:</p>
  
  <p>Conference1_Name    3               (teams in conference)</p>
  
  <p>Team_1_Name 31 15 2 2 (wins, losses, ot losses, shootout losses)</p>
  
  <p>Team_2_Name 24 21 1 0</p>
  
  <p>Team_3_Name 27 19 0 2</p>
  
  <p>Conference2_Name    4</p>
  
  <p>Team_4_Name 30 15 1 1</p>
  
  <p>...</p>
  
  <p>aaand this is my code so far...</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;limits.h&gt;
  
  int main(void){
      int n=0, N=25, nE=0, nW=0, i, w[n], l[n], otl[n], sol[n], gp[n], pts[n];
      char input[30], team[n][30];
  
      printf("Enter conference data\n");
      setvbuf(stdout,NULL,_IONBF,0);
  
      while(n&lt;=N){
          scanf("%s", input);
          if (0==strcmp(input, "Eastern_Conference")) {
              scanf("%d", &amp;nE);
              continue; //does not count eastern conference as a team, but stores number of teams, and does not increment n
          }
  
          if (0==strcmp(input, "Western_Conference")) {
              scanf("%d", &amp;nW);
              continue; //does not count western conference as a team, but stores number of teams, and does not increment n
          }
  
          if (0==strcmp(input, "EOD")) break; 
  
      //originally i had a statement like: if (nE&gt;0 &amp;&amp; nW&gt;0){N=nE+nW;) so that the loop condition n&lt;N will break the loop on it's own but thought maybe EOD would simplify it and fix my problem//
  
  
          strcpy(team[n], input);
          scanf("%d%d%d%d", &amp;w[n], &amp;l[n], &amp;otl[n], &amp;sol[n]);
  
          gp[n]=w[n]+l[n];
          pts[n]=(2*w[n])+otl[n]+sol[n];
  
          n++;
  
      }   //so we have input the data and calculated points
  
      printf("\n%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "WHL", "GP", "W", "L", "OTL", "SL", "PTS");
      for(i=0; i&lt;n; i++){
          printf("%s\t%d\t%d\t%d\t%d\t%d\t%d\n", team[i], gp[i], w[i], l[i], otl[i], sol[i], pts[i]);
      }
  
      return EXIT_SUCCESS;
  }
  </code></pre>