Answered step by step
Verified Expert Solution
Link Copied!

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
}
}
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 image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is meant by 'differential cost'?

Answered: 1 week ago

Question

3 The distinction between microeconomics and macroeconomics.

Answered: 1 week ago

Question

2 The role of economic theory in economics.

Answered: 1 week ago