yeah just one more I just wanted to clarify that once I output that code you get 20 random integers: These are my diagonal integers right? Because my professor wrote that information like B[0][0] is copied to A[0]...ect. So I though I actually had to go and individually cout all these values. But with the code I just ran it looks like I have already gotten the 20 diagonal values.
With the code above you have the diagonal. If your prof wants it in some specific form, then you need to do more. Otherwise, what you have gives the diagonal you're looking for.
Yeah my professor wanted me to also sort those diagonal elements and output the median value as well as the mean. But I already know how to do this on my own my main struggle was converting between arrays. Thanks fg109 that clarifies my question.