12345678
void calcbatavg() { for(int index=0;index<MAXPLAYER;index++) { batavgs[index]=((hits[index])/(atbats[index]-walks[index])); cout<<setprecision (3)<<batavgs[index]; } }