Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 #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
}
}
int sum_main_d(int x[size][size])
{
int s=0;
for (int i=0;i
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 s+=x[i][i];
return s;
}
int main()
{
srand(time(0));
int array1[size][size];
fill(array1);
print(array1);
cout
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started