Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use C++ to Code!! | 1633432+ ttu.blackboard.com Frank Sinatra-LO.V.E. (lyrics) Y

ID: 3601839 • Letter: U

Question

Use C++ to Code!!

| 1633432+ ttu.blackboard.com Frank Sinatra-LO.V.E. (lyrics) YouTube ### Welcome to the ECE-1305 ###-201827-ECE https:llttu.b 303545 8) What is the output of the following program? What operation is done over the matrix. #include using nanespace std; void here(int& x, int& y): int main const int SIZE-4; int alSIZE) ISIZE-t8,2,8,3, te,9,6,1),13,7,6,4),1,-4,3,-2 int i,j for ( i=1; iSIZE ; i++) for (1-0:j SIZE-1:j+) here(aliltj),al51i): for (i:1 SIZE:in for (j0:j SIZE:j++) coutecali]jl

Explanation / Answer

output for 8)
8 8 3 1
2 9 6 -4
8 7 6 3
3 1 4 -2

operation here is :transpose of matrix

9) Output
2 1 3 5
-1 4 3 5
-1 1 6 5
-1 1 3 8

   if(i==j)                     this operation is for diagonal
       value of diagonal element is calculated by this formula : Array[i][j]=2*i+2;

i.e mutiple of 2

else
        Array[i][j]=2*j-1;
    }

except diagonal all other elements are generated by this formula :Array[i][j]=2*j-1;
   i.e generating odd number

operation here is :genearting a matrix such that diagonal elements are even number, while other non diagonal elements are odd.

i is used to move around columns

j is used to move around rows:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If you have still have doubts , do comment it.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote