Does anyone know how to program an array, where in the actual program you'll need to enter values for each buyer for example and then calculate the values given to them and then the average of all of them.
Here's the sample output
Enter five item price for each buyer
Buyer #1
45 78 22 101
Buyer #2
89 138 789 400
Buyer #3
18 55 46 249
Buyer #4
978 75 67 24
Buyer #5
100 287 101 26
There are 5 buyers, so you need an array of 5 elements, one for each buyer.
Each buyer has 4 item prices. So there's an array for that. The easiest way to handle this is a two-dimensional array. Here is code that enters the info into a 2D array:
titepanatiks, you need to reset b to zero after printing each row. Also, keep in mind that you need to print the grand total at the very end, so you may want another variable to store that.