TotSales+=iTotSalesperPerson[j]; is evaluated to
TotSales=TotSales+iTotSalesperPerson[j];
because you do not initialize the TotSales to anything it contains garbage
So what you get is
TotSales="garbage"+iTotSalesperPerson[j];
TotSales+=iTotSalesperPerson[j]; is evaluated to
TotSales=TotSales+iTotSalesperPerson[j];
because you do not initialize the TotSales to anything it contains garbage
So what you get is
TotSales="garbage"+iTotSalesperPerson[j];
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler