Spaces:
Sleeping
Sleeping
| # Level 3: Cakes, Cookies, and Pies in 2D Arrays | |
| The owner of the Project Mercury Pastries Food Truck wants to find the total inventory for each dessert. They have the following values: | |
| ``` | |
| 25 17 22 | |
| 18 12 15 | |
| 21 19 27 | |
| 30 10 23 | |
| ``` | |
| Each row represents a unique food truck in the business. Each column represents the number of cakes, cookies, and pies, respectively. | |
| Write a method that totals each column and displays the total for each category: | |
| ``` | |
| Cakes: 94 | |
| Cookies: 58 | |
| Pies: 87 | |
| ``` |