



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Double subscripted array that receives the number of the employee and what/how much product they sold last month, then display them on a 2D table with their total at the last column for how much the employee has sold, and for the last row for each product.
Typology: Exercises
1 / 5
This page cannot be seen from the preview
Don't miss anything!




#include<stdio.h> #include
int main(void) { /* declare and initialize the array / float sales[4][5] = { 0.0 }; / call the function to read in the sales from the user/ getSales(sales); /call the function to display the table header / printHeader(); / call the function to display the sales */ printSales(sales); system("pause"); return 0; } /***** getSales **********
printf("Sales-%30s\n", "Products"); printf("person %8d%8d%8d%8d%8d%9s\n", 1, 2, 3, 4, 5, "Total"); } /***** printSales **********
printf("%8.2f\n", totalSales); } printf("Total "); for (j = 0; j < 5; j++) printf("%8.2f", productSales[j]); printf("\n"); }