Answer the question
In order to leave comments, you need to log in
How to swap elements of an array?
Hello, I'm solving this problem: Given an integer square matrix. Find the largest element in each
line and swap it with the main diagonal element.
needs to be solved for a static array. How do I swap the main diagonal element with another element? without using pointers
Answer the question
In order to leave comments, you need to log in
Use tag code.
Why is this:
max = a[i][j];
if (a[i][j] = max)
{
a[i][j] = a[i][i];
a[i][i] = max;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question