Answer the question
In order to leave comments, you need to log in
Why is the id not defined?
#include <stdio.h>
#pragma warning(disable : 4996)
int wannazachet(int matr[n][n], int i, int j) {
for (int o = 0; o < n; o++) {
for (int l = 0; l < n; l++) {
printf("%d ", matr[o][l]);
}
printf("\n");
}
}
int main() {
int i = 0, j = 0, n = 0, o = 0, l = 0, d = 0;
int matr[99][99], a[99], matr1[99][99];
scanf("%d", &n);
scanf("%d %d", &i, &j);
for (int o = 0; o < n; o++) {
for (l = 0; l < n; l++) {
scanf("%d", &matr[o][l]);
}
}
wannazachet(matr[n][n], i, j);
}
int wannazachet(int matr[n][n], int i, int j)
index n is not defined why....?
Answer the question
In order to leave comments, you need to log in
Because at the moment the function is defined, no n exists. And it doesn't make n sense in this context.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question