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

a metreLoop through D gun at timensional array representing . the tool Inc.\" a

ID: 3606474 • Letter: A

Question

a metreLoop through D gun at timensional array representing . the tool Inc." a top three the red, column of a L-D army usung I his (re at a rested lasp) In a front ending top lie while(TRUE) punt at and on a th based not with a a) every center ton b) every at the bar c) every other aun rese han recasts dergy is there ) many front of e) Curion 3 iterichoa it is a trbona cci au omber S test to see Gven any * , ); Count value as welve 5) given a revory here R) (running mats he number of iterations will fe, retens the same It did on the first Call G Request to others from a veri and J print he saw and scal of the army eyArmy

Explanation / Answer

Solution:

1)

for(int i=0; i<n; i++) //Loop to iterate through rows and n here is the order of 2D matrix

{

for(int j=0; j<n; j++) //loop through the columns

{

if(i==j)

printf("This is the diagonal element%d", array[i][j]); // Displaying the diagonal in C you can use respective sytax for a //particular language, in canse of any doubt as in the comments

}

}

2)

int k= 3;

for(int i=0; i<n; i++) //Loop to iterate through rows and n here is the order of 2D matrix

{

for(int j=0; j<n; j= j+k) //loop through the columns

{

printf("%d is the element of %dth column",array[i][j], j); // This will do the job

k++;

}

}

More than one question asked, please repost others. I advise you to post in good handwriting or typed question will get the answers very fast.

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