Code://This code is supposed to ask the user to enter 5 players, name //number and points scored. It then calculates the total score of // all players, added together. It shows each individuals name, # //and score. Then it displays the players scores added together. //Could someone please try the code and see if you can see why //my program doesn't iterate through the code in the proper way? #include <iostream> #include <iomanip> using namespace std; struct PlayerInfo { char name[30]; int playernumber; int points; }; int main() { int allplayerstotals; PlayerInfo players[5]; int index; //Get player information. cout<<"Enter 5 players names, numbers and points scored.\n"; for (index = 0; index < 5; index++) { cout<<"Player # "<<(index + 1)<<"'s name? : "; cin.getline(players[index].name, 30); cout<<"Player's number? : "; cin>>players[index].playernumber; cout<<"Player's points? : "; cin>>players[index].points; } //Display player stats. for (index = 0; index < 5; index++) { allplayerstotals += players[index].points; cout<<"Player # "<<(index + 1)<<"stats :\n"; cout<<"Name :"<<players[index].name<<endl; cout<<"No.# :"<<players[index].playernumber<<endl; cout<<"Points:"<<players[index].points<<endl; allplayerstotals += players[index].points; } cout<<"All players' totals together are :"<<allplayerstotals; return 0; }