Question: function+array add function for the code below to find the sum of secondary elements the sum of element above main diagonal the sum of element

function+array
add function for the code below to find
the sum of secondary elements
the sum of element above main diagonal
the sum of element below main diagonal
the average of all elements
// Example program
#include
#include
#include
#include
using namespace std;
//recursive functions
const int size=10;
void fill(int x[size][size])
{
for (int i=0;i
{
for(int j=0;j
x[i][j]=rand()%66+35;
}
}
void print(int x[size][size])
{
for (int i=0;i
{
for (int j=0;j
cout
cout
}
}
int sum_main_d(int x[size][size])
{
int s=0;
for (int i=0;i
s+=x[i][i];
return s;
}
int main()
{
srand(time(0));
int array1[size][size];
fill(array1);
print(array1);
cout  function+array add function for the code below to find the sum
of secondary elements the sum of element above main diagonal the sum
10*7.57 d. 17.3B/S function+array add function for the code below to find the sum of secondary elements the sum of element above main diagonal the sum of element below main diagonal the average of all elements // Example program #include #include #include #include using namespace std; //recursive functions const int size=10; void fill(int x[size][size]) { for (int i=0;i > 01 07:57 655B/S vold print(int x[size][size]) { for (int i=0;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!