Jun 12, 2013 at 6:53am UTC
For some reason my program will not add up the columns. It will print out the row sums but rounded down to the lowest integer. I can not figure out why it is doing this.
Last edited on Jun 12, 2013 at 7:52am UTC
Jun 12, 2013 at 7:26am UTC
1 2
arrayOfSales[5][NUMBERCOLUMNS] = total; // Illegal. You are trying to access an out of bounds index.
//Column Index numbers are 0 to NUMBERCOLUMNS-1.
Similarly for the other function.
Also, the statement
arrayOfSales[][] = total;
should be out of the inner loop.
Last edited on Jun 12, 2013 at 7:27am UTC
Jun 12, 2013 at 7:42am UTC
Thanks!
Last edited on Jun 16, 2013 at 11:51pm UTC
Jun 12, 2013 at 7:51am UTC
You have declared total as an int.