Symmetric matrix check
C++ Loops
nested loops
Flowchart (ISO 5807)
Source code
bool isSymmetric(int a[][10], int n) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (a[i][j] != a[j][i]) {
return false;
}
}
}
return true;
}