这段代码有什么问题?
'''cpp
'''cap
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a[105][105], num = 1;
cin >> n;
for (int i = 1; i <= n; i ++) {
for (int j = 1; j <= n; j ++)
a[i][j] = num;
num ++;
}
for (int i = 1; i <= n; i ++) {
if (i % 2 == 0) {
int b[105];
num = 1;
for (int j = n; j > 0; j --) {
b[num] = a[i][j];
num ++;
}
for (int j = 1; j <= n; j ++)
a[i][j] = b[j];
}
}
for (int i = 1; i <= n; i ++) {
for (int j = 1; j <= n; j ++)
cout << a[i][j] << " ";
cout << endl;
}
}
'''