I've been told to make a program that takes in the data for 3 soccer players throughout 10 games. when i run it so far (i havent made the print function yet) it asks for the name of the player, then enters the nested loop and never stops for input (at any of the "cin >>" spots) any ideas as to why?
Code:
#include <iostream.h>
int main ()
{
int names[3];
int shots[10];
int shotsongoal[10];
int goals[10];
for (int i=1; i<=3; i++)
{
cout << "Player " << i << "'s name: " << endl;
cin >> names[i];
for (int x=1; x<=10; x++)
{
cout << "Game " << x << endl;
cout << "Shots: \n";
cin >> shots[x];
cout << "Shots on Goal: \n";
cin >> shotsongoal[x];
cout << "Goals: \n";
cin >> goals[x];
}
}
system("PAUSE");
return 0;
}