MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / salesman_sum

Function salesman_sum

Lab_09/Source2.cpp:17–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17void salesman_sum(int a[3][5])
18{
19 int row, col, sum = 0;
20 // finding the column sum
21 for (row = 0; row < 5; ++row)
22 {
23 for (col = 0; col < 3; ++col)
24 {
25
26 // Add the element
27 sum = sum + a[col][row];
28 }
29 // Print the column sum
30 cout << "The Total sales of Salesman " << row + 1 << " is " << sum << endl;
31 // Reset the sum
32 sum = 0;
33 }
34}
35
36void sales_sum(int a[3][5])
37{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected