do
 {  
    if (Y == 'Y' || Y == 'y')
    
   for (j = 0; j < numofplayersonteam; j++)
   {
         for (i = 0; i < numofgamesinseries; i++)             
        {
             
              cout << "Enter player " << j+1 << "'s score " << i+1 << ": ";
              cin >> score[i][j];
               
        }  
        
   if (score [i][j] >= 0 && score [i][j] <= 300)
       
      {
         cout << "Game 1 : " << score [0][0] << endl;
         cout << "Game 2 : " << score [1][0] << endl;
         cout << "Game 3 : " << score [2][0] << endl;
         cout << "Series : " <<  score[0][0]+score[1][0]+score[2][0] << endl;
         cout << "AVG. : " << ((score[0][0]+score[1][0]+score[2][0])/numofgamesinseries) << endl;
         cout << "" << endl;
         }
         
         cout << "Team 1 Totals: " << 1 << endl;
         
         }
         
         else
         {
        cout << score[i] << " is not a valid score ! Score must be from 0 to 300" << endl;
         }
        }
        
         
      else
         {
          cout << "All finished ? Thank you !" << endl;
         } 
      } 
         
      
 
 while ((Y == 'Y' || Y == 'y'));
 
    system("PAUSE");
    return EXIT_SUCCESS;
}

What the code should do is print players 1-4's scores then at the end print the team 1 totals, but it wont compile, what am I missing?
I'm assuming its a "}" but I cant figure where to put it.

I would take a minute or two and get the formatting all straightened out (get stuff tabbed in and line up all the opening and closing braces with each other) and the answer should be evident.

(Post 2000)-- ignore this

Edited 6 Years Ago by jonsca: n/a

This article has been dead for over six months. Start a new discussion instead.